Michael Philip's Blog

Writing about MS Tech with strong focus on Azure & CRM

How To : Check if an Entity can Participate in Many-To-Many Relationships in Microsoft Dynamics CRM 2011 Using VB.NET

Leave a comment

The following code shows how you can check if an Entity can be the Primary Entity in a Many-To-Many Relationship or not.

Code:

//Create The Request
CanManyToManyRequest Request = new CanManyToManyRequest();

//Set Entity Name
Request.EntityName = “account”;

//Execute 
CanManyToManyResponse Response = (CanManyToManyResponse)_serviceProxy.Execute(Request);

//Get The Result
var result = Response.CanManyToMany;

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s