Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Quick Question about passing value to entity referance field via webapi

Posted on by

Before i create a new project (new instance set up) i was woundeing if anyone new this off the top of your head, if i want to pass a value to a field of type EntityRefrance (ex_exampleEntityReferance in the example below) do you just pass the GUID for the record or do you need a set if in a diffrent way?


POST [Organization URI]/api/data/v9.0/accounts HTTP/1.1
Content-Type: application/json; charset=utf-8
OData-MaxVersion: 4.0
OData-Version: 4.0
Accept: application/json

{
    "name": "Sample Account",
    "creditonhold": false,
    "address1_latitude": 47.639583,
    "description": "This is the description of the sample account",
    "revenue": 5000000,
    "ex_exampleEntityReferance": ??????
}


Thanks for any help

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Quick Question about passing value to entity referance field via webapi

    Hi,

    Please check below article to set the lookup field from web api.

    carldesouza.com/.../

    www.google.com/.../

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Quick Question about passing value to entity referance field via webapi

    Hello,

    If my reply (or replies) answers your question take a minute and verify the answer. You can do it by clicking "Yes" at the top of the reply (or replies) under the label "Does this answer your question?"

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Quick Question about passing value to entity referance field via webapi

    Hello,

    I would recommend starting using DataVerse Rest Builder to avoid guessing.

    github.com/.../DRB

    It's available as an XrmToolbox plugin and as a model-driven app.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans