locked
Retrive guid of related manay to many records RRS feed

  • Question

  • Dear all;

    i have custom entity related to lead i want to have all related records with that entity to lead so for example if a lead has two custom entity records asoociated with it i want those guid id's

    Wednesday, January 21, 2015 9:16 AM

Answers

  • you can always Query the intermediate table to get the required values. In CRM when ever a N:N relationship is created there will be intermediate table created which will have lookup for both the records. in your case the table name could be something line "new_lead_new_customentity" or new_new_customentity_lead". this entity will not be accessible using advance find but you can always write your own fetchxml/Query Expression to retrieve records.

    If my response answered your question, please "mark the response as an answer" and also "vote as helpful". Regards, Hari. www.crm2011byhari.blogspot.com

    Wednesday, January 21, 2015 9:36 AM

All replies

  • Use  Odata Query to retrieve  custom entity Guid, using Lead Id as filter.

    Ref below :

    http://garethtuckercrm.com/tag/odata/

    Wednesday, January 21, 2015 9:35 AM
  • you can always Query the intermediate table to get the required values. In CRM when ever a N:N relationship is created there will be intermediate table created which will have lookup for both the records. in your case the table name could be something line "new_lead_new_customentity" or new_new_customentity_lead". this entity will not be accessible using advance find but you can always write your own fetchxml/Query Expression to retrieve records.

    If my response answered your question, please "mark the response as an answer" and also "vote as helpful". Regards, Hari. www.crm2011byhari.blogspot.com

    Wednesday, January 21, 2015 9:36 AM