Random Musings

June 6, 2009

AssociateEntityRequest – Used to link two entities in many to many relationships

Filed under: Dynamics CRM — haditeo @ 9:08 pm
Tags: ,

In order to link two different entities in the many to many relationship, both entities should have been created first, so that their GUID are exist

Use below codes to associate both entities

Moniker moniker1 = new Moniker();
moniker1.Name = "entity1Name";
moniker1.Id = new Guid("11111111-2222-3333-4444-5555555555555");
Moniker moniker2 = new Moniker();
moniker2.Name = "entity2Name";
moniker2.Id = new Guid("66666666-7777-8888-9999-0000000000000");

AssociateEntitiesRequest request = new AssociateEntitiesRequest();
request.Moniker1 = moniker1;
request.Moniker2 = moniker2;
request.RelationshipName = "relationshipName";


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

Blog at WordPress.com.

%d bloggers like this: