The Microsoft Dynamics CRM Blog
News and views from the Microsoft Dynamics CRM Team

Relationships eligibility in Titan (CRM 4)

Relationships eligibility in Titan (CRM 4)

  • Comments 2

If you are wondering what entities are eligible for which types of relationships, wonder no more, you can determine that programmatically using the Metadata API. We added a couple of new messages (documented on the SDK) that will make CRM customizers/developers life easier. The messages are: CanBeReferenced, CanBeReferencing, CanManyToMany, GetValidManytoMany, GetValidReferencedEntities, GetValidReferencingEntities. Small sample:

public static void relationshipsEligibilityTest(MetadataService metadataService)

{

GetValidManyToManyRequest getValidManyToManyRequest = new GetValidManyToManyRequest();

GetValidManyToManyResponse getValidManyToManyResponse = (GetValidManyToManyResponse)           
       metadataService.Execute(getValidManyToManyRequest);

foreach (string nextName in getValidManyToManyResponse.EntityNames)

{

Console.WriteLine(nextName);

}

}

Also, what you see is what you get… meaning that the customizations UI will only show entities that are valid for a given kind of relationship. For example, if an entity is not available for N:N relationships the “New N:N..” button won’t appear. There may still be minor adjustments for RTM but we don’t expect any major changes in the relationships area.

Also note that there is an outdated relationship eligibility list in several Titan docs, including the “what is new” and the SDK. Our documentation team is in the process of updating the docs… we will probably update that list shortly or remove it all together (the list is not that useful now that we have APIs and the UI has been fixed).

Humberto Lezama Guadarrama

Page 1 of 1 (2 items)
Leave a Comment
  • Please add 1 and 3 and type the answer here:
  • Post