Search code examples
c#dynamics-crmcrm

Plugin triggered on deleting reference between Marketing List and Campaign - Plugin Registration Tool


I am working on plugin that should populate Number of Campaigns(Whole number) field on Account , Lead and Contact entities. It should count on how many Campaigns are these records used on. Connection is Marketing List. Some record is on Marketing Lists, and Marketing Lists are used on Campaigns and plugin should calculate number of Campaigns for particular record.

I have made a plugin, and registered steps that will triggered it on AddListMember and RemoveMember, messages for Marketing List. Plugin is working fine for that messages.

My problem is how to trigger it when a Marketing List is removed or added on Campaign. I haven't found any message for that.

Is there any message for that event, or any other way to do it?


Solution

  • For N:N relations you can use Associate/Disassociate messages. You can find more details here