web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Campaign Distribution using Plugin

(0) ShareShare
ReportReport
Posted on by

I have a campaign with related marketing list and campaign activities. I have to distribute campaign activity based on plugin registration step.

How to use campaign distribution message properties in plugin ?  

*This post is locked for comments

I have the same question (0)
  • Nithya Gopinath Profile Picture
    17,078 on at

    Hi Swathi,

    You can register the plugin by the message Distribute Campaign Activity.

    https://nishantrana.me/2012/06/07/writing-a-plugin-on-distribute-campaign-activity-message-in-crm/

    Hope this helps.

     

  • Community Member Profile Picture
    on at

    Hi Nithya,

    Thanks for your reply.

    But I dont want to Write a Plugin on “Distribute Campaign Activity” message in CRM. I want to distribute a campaign activity using a plugin.  

    For Eg., Whenever you are creating a record in a custom entity, Specified campaign activity should be distributed. (Based on registered plugin).

  • Suggested answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi Swathi,

    I think you need the code to distribute campaign activity to the marketing lists.

    See: msdn.microsoft.com/.../hh547397.aspx

  • Community Member Profile Picture
    on at

    Hi Nithya,

    Thx for your time.

    Yes, As you said I am working on that message. Early bound method is used In that sample code. I am using late bound in my case. Below Is the message property list . Activity is one of the required property.  What value should I use for activity property.(Using Latebound)

                           Sample message request uses earlybound :

                // Create the phone call to use for distribution.
                var phonecall = new PhoneCall
                {
                    Subject = "Sample Phone Call"
                };

                           DistributeCampaignActivityRequest distributeRequest =

                           new DistributeCampaignActivityRequest()

                           {

                               Activity = phonecall,

                               CampaignActivityId = _campaignActivityId,

                               Owner = new EntityReference("systemuser", _marketingManagerId),

                               OwnershipOptions = PropagationOwnershipOptions.Caller,

                               PostWorkflowEvent = true,

                               Propagate = true,

                               SendEmail = false,

                           };

  • Verified answer
    Community Member Profile Picture
    on at

             For Latebound :

               Entity phonecall = new Entity("phonecall");

               phonecall["Subject"] = "Sample Phone Call";

               DistributeCampaignActivityRequest distributeRequest =

                           new DistributeCampaignActivityRequest()

                           {

                               Activity = phonecall,

                               CampaignActivityId = _campaignActivityId,

                               Owner = new EntityReference("systemuser", _marketingManagerId),

                               OwnershipOptions = PropagationOwnershipOptions.Caller,

                               PostWorkflowEvent = true,

                               Propagate = true,

                               SendEmail = false,

                           };

               service.Execute(distributeRequest);

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans