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?
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>
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?
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.
Hi User -
Using the schemename works in your scenario.
what does "navigation property" mean here?
Daivat Vartak (v-9d...
225
Super User 2025 Season 1
Muhammad Shahzad Sh...
106
Most Valuable Professional
Eugen Podkorytov
102