Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Quick Question about passing value to entity referance field via webapi

(0) ShareShare
ReportReport
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
    28,981 Moderator 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
    84,331 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
    84,331 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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 106 Most Valuable Professional

#3
Eugen Podkorytov Profile Picture

Eugen Podkorytov 102

Overall leaderboard

Product updates

Dynamics 365 release plans