Mscrm 2011 plugin registered on Associate message code:
//Getting the Relationship Name ,Target(Practice group id) and Relted entity (Account ID)
if (!context.InputParameters.Contains("Relationship")) { return; }
Relationship relationship = (Relationship)context.InputParameters["Relationship"];
if (relationship.SchemaName != "lrl_lrl_practicegroup_account") { return; }
if (!context.InputParameters.Contains("Target")) { return; }
EntityReference target = (EntityReference)context.InputParameters["Target"];
Guid practiceGroupId = target.Id;
if (!context.InputParameters.Contains("RelatedEntities")) { return; }
EntityReferenceCollection related = (EntityReferenceCollection)context.InputParameters["RelatedEntities"];
foreach (EntityReference entityReferenceObj in related)
{
accountId = entityReferenceObj.Id;
}
No comments:
Post a Comment