Writing a Plugin on “Distribute Campaign Activity” message in CRM.


We recently had a requirement to execute a plugin  when a CampaignActivity is distributed using “Distribute Campaign Activity” button.

As it turned out, this message was not available.

As it was on premise, we enabled it in an unsupported manner i.e. by updating the sdkmessagefilterbase table in orgname_mscrm database.

SQL Query Used :-

update sdkmessagefilterbase

set isCustomProcessingStepAllowed=1


sdkmessageid=(select sdkmessageid from sdkmessagebase where name=‘DistributeCampaignActivity’)



Hope this helps.

Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

2 thoughts on “Writing a Plugin on “Distribute Campaign Activity” message in CRM.”

  1. Nice one..
    I have one issue in this plugin registration. My requirement is to throw an exception if some conditions are not met before distributing Campaign Activity. But when the exception thrown from plugin, in UI it showing some generic error message(An error has occurred. Please contact Microsoft Dynamics CRM……), not the custom message from plugin. How to handle this situation?


Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s