Tuesday, January 21, 2014

CRM 2011 - Reflexive relationship must specify direction using ReflexiveManyToManyRelationship

When trying to retrieve data for reflexive relationship I was getting the exception which is the title of this post. How I was able to fix the same was by just using once line of code as below which will mention whether the role is referencing or referenced.
 
relationship.PrimaryEntityRole = EntityRole.Referencing;
 
where relationship is the object Relationship.
 
Hope this helped someone. !!!

No comments:

Configuration for CRM Plugins

CRM plugins are always great feature where we can automate many functionality which we cannot automate from user interface. But almost eve...