Skip to main content

Notifications

Community site session details

Community site session details

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

Which name to be used to update a custom entity with lookup field

(0) ShareShare
ReportReport
Posted on by 45

Hi,

I would like to know what to send in request for lookup field for inserting an entity to Microsoft CRM.

If I post a request to http://<server url>/api/data/v9.1/new_my_activities

with body

{"new_id":"abc-def","new_my_opportunityID@odata.bind":"/opportunities(2b685c81-4f1c-e511-80d3-3863bb347ba8)"}

Here new_my_opportunityID is my schema name for lookup entity, what I would like to confirm is do we use schema name, logical name or Navigation property name here?

SchemaName worked for me but some where it was suggested to use navigation property?

Could someone please confirm which name is used in rest request for lookup field?

  • User KS Profile Picture
    45 on at
    RE: Which name to be used to update a custom entity with lookup field

    When you go to customization->developer resources->download ODataV4Metadata you will get an xml with something like below for the attribute:

    <NavigationProperty Name="new_my_opportunityID" Type="mscrm.opportunity" Nullable="false" Partner="new_opportunity_new_my_activity_my_opportunityID"><ReferentialConstraint Property="_new_my_opportunityid_value" ReferencedProperty="opportunityid" /></NavigationProperty>

  • Suggested answer
    chris xu Profile Picture
    on at
    RE: Which name to be used to update a custom entity with lookup field

    Below is a sample screenshot of one lookup type field, I did not find the mentioned navigation property name - could you please share your screenshot if required and applicable?

    Annotation-2020_2D00_05_2D00_19-145513.png

  • User KS Profile Picture
    45 on at
    RE: Which name to be used to update a custom entity with lookup field

    When we check the metadata for our account we can go to the attribute which is lookup field. There we have a navigation property name.

  • Suggested answer
    chris xu Profile Picture
    on at
    RE: Which name to be used to update a custom entity with lookup field

    Hi User -

    Using the schemename works in your scenario.

    what does "navigation property" mean here?

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