locked
Get Contact Roles - CRM 2013. Urgent RRS feed

  • Question

  • I am trying to get contact roles from CRM with no success.

    I read some tutorial and it says that there must be connection between account and contact and get connectionid and get contact roles. I am not able to get anything from it. Please I just need contact roles by contact name. Please provide the code for getting contact roles by contact name.

    I am using c#.

    Sunday, March 22, 2015 8:37 AM

All replies

  • inside Dynamics CRM there isn't an entity called contact roles, maybe you mean security roles? (connected to users)

    My blog: www.crmanswers.net - Rockstar 365 Profile

    Monday, March 23, 2015 2:40 AM
  • There are two ways that contact roles can be stored in Crm:

    1. Using the customerrelationship entity. This will be joined to a contact by either the customerid or partnerid field, and the role will come from the respective customerroleid or partnerroleid field

    2. Using the connection entity. This will be joined to a contact by the record1id field, and role will come from the record1roleid field (note that you don't need to query of record2id at all)


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Monday, March 23, 2015 2:25 PM
    Moderator