relationship - type of behavior RRS feed

  • Question

  • hi, anyone know how to get the name of "type of behavior of relationships" (system, parental, referential restrict delete, and configurable cascading) by accessing metadata?

    thanks in advance

    Monday, March 7, 2011 2:59 AM


  • hey melvin.. here is the code to retrieve the relationship information.. go through OneToManyMetadata and ManyToManyMetadata class properties in SDK, will help you more in this.

    MetadataService metadataService = GetMetadataService("ABC_ORG");


    RetrieveRelationshipRequest request = new RetrieveRelationshipRequest();

    request.Name = "xyz_accounts";

    request.RetrieveAsIfPublished = true;

    RetrieveRelationshipResponse response = (RetrieveRelationshipResponse)metadataService.Execute(request);


    if (response.RelationshipMetadata is OneToManyMetadata)


        OneToManyMetadata xyzAccounts = (OneToManyMetadata)response.RelationshipMetadata;








    Monday, March 7, 2011 6:53 AM