web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

relations between opportunity contact and account

(0) ShareShare
ReportReport
Posted on by 14

I'm trying to fetch information about contacts and opportunities through the api, as I read in the docs contact endpoint docs. For a given contact that has an account linked to it the api returns `null` for _accountid_value field but the account id is returned in this field: _parentcustomerid_value. What is the difference between. What is the difference between both fields?

In the documentation for _accountid_value the description is "Unique identifier of the account with which the contact is associated."  and for _parentcustomerid_value: "Select the parent account or parent contact for the contact to provide a quick link to additional details, such as financial information, activities, and opportunities.".

What is the difference between parent account and an "associated" account?

Same goes for opportunities there are _accountid_value _customerid_value and _parentaccountid_value _parentcustomerid_value. When is an account considered parent?

*This post is locked for comments

I have the same question (0)
  • David Jennaway Profile Picture
    14,065 on at
    RE: relations between opportunity contact and account

    These fields are of type customer, which means that they can store a reference to either a contact or an account. To support this, CRM exposes the main customer field (e.g. parentcustomerid), but also fields for either underlying entity type (e.g. accountid). As far as I see it, the fields for the underlying type are a legacy consequence of how this used to be implemented, and you should always use the main customer field (you should definitely use the main customer field for any data modification).

    Re 'What is the difference between parent account and an "associated" account' - there is no difference; the documentation is just using different terms for the same thing

  • alexnad Profile Picture
    14 on at
    RE: relations between opportunity contact and account

    Thanks, makes sense that the customer field could store a reference to either contact or an account field as the system allows the user to chose a contact in the "account field" which is a bit confusing.

    Lets say we have this cenario: We have contact Joe, contact Bob, and one account Corp ltd. Bob has as account "Corp ltd" and in the account field of Joe i chose Bob does that mean the the "account" of Joe is the "account" of Bob? If not, what does the name account mean in that context?

    Also when fetching a contact through the API is there a way to know if the _parentcustomerid_value is a reference to an account or a contact?

  • alexnad Profile Picture
    14 on at
    RE: relations between opportunity contact and account

    Also about the opportunities, I created an opportunity and added an account and a contact to that opportunity. I fetched it through the API and the values of the returned fields were:

    {

      _accountid_value: null,

      _customerid_value: null,

      _parentaccountid_value: <accountid>,

      _parentcustomerid_value: <customerid>

    }

    So the "parent" fields contain the references to the related account and customer. Do the fields "_accountid_value" and "_customerid_value" have another purpose or are they legacy code?

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: relations between opportunity contact and account

    Hi,

    I would suggest you to use CRM Rest Builder tool and generate the web api queries from there. this will help you clear your doubts as you can build, execute and see the response within the tool.  

    Refer this: carldesouza.com/.../

    You can download the tool here- github.com/.../releases

    Instead of going for the schema names mentioned in the documentation, you can use the field/schema name which you are using on your form. For Opportunity, there are 3 fields which you can use, Contact, Account & Potential Customer. The field is autmatically populated with the value of Account selected, if no account then contact.

    Hope this helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans