Plugin message for the Marketing list Association to Campaign in MSCRM 2011:
Message : ADDITEM meesage will be fired when Marketing list Association to Campaign but not The Association message
Primary entity is : Campaign
Input parameters received in plugin context is:
1. Entity name: List
2. Campaign id: Campaign Guid
3. Entity id: Associated marketing List Guid
Sample code:
if (context.InputParameters.Contains("EntityName"))
{
if (context.InputParameters["EntityName"].ToString() == "list")
{
if (context.InputParameters.Contains("EntityId"))
{
marketingListId = context.InputParameters["EntityId"].ToString();
}
if (context.InputParameters.Contains("CampaignId"))
{
campaignId = context.InputParameters["CampaignId"].ToString();
}
}
}
No comments:
Post a Comment