Monday 20 February 2012

Associate and Dissociate Message event

To use this event register it on primary and secondary entity "none" and then use code to figure out which entity is it mapped firing on


EntityReference target = (EntityReference)parameters["Target"];
Relationship relationship = (Relationship)parameters["Relationship"];
EntityReferenceCollection relatedEntities = (EntityReferenceCollection)parameters["RelatedEntities"];

where target is the source entity to which entities are getting associated with. and related entities is the collection of entities which are getting associated with target entity.

in order to disallow any selection, register the plugin on "PreInsideTransaction"


http://www.avanadeblog.com/xrm/2010/05/i-find-your-lack-of-events-disturbing.html

No comments:

Post a Comment