
Hi everyone,
I’m working on a customization where I copy a record (using JavaScript + Dataverse Web API) and create a new one with the same data. This includes several lookup fields.
When I retrieve a record using the Web API with annotations, lookup values come back in this format"
"_samplelookupfield_value": "GUID",
"_samplelookupfield_value@Microsoft.Dynamics.CRM.lookuplogicalname": "systemuser"
So the first problem is, I am not getting the Field@Microsoft.Dynamics.CRM.associatednavigationproperty in the response.
So naturally, I tried creating the new record using:
"samplelookupfield@odata.bind": "/systemusers(GUID)"
But this fails with an OData error saying the property is undeclared.
However, when I use checked in the background the field logical/schema name is and it works perfectly.
"SampleLookupField@odata.bind": "/systemusers(GUID)"
I want to avoid hardcoding navigation property names because: