“An undeclared property ‘customerid’ which only has property annotations in the payload but no property value was found in the payload. In OData, only declared navigation properties and declared named streams can be represented as properties without values.”
We can achieve this functionality by adding suffix entity name to the schema name of the field.
Steps of Implementation:
Below code demonstrates how to set Account on Contact.
entity["email@example.com"] = "/accounts(" + Account_GUID + ")";
Below code demonstrates how to set Contact on Contact.
entity["firstname.lastname@example.org"] = "/contacts(" + Contact_GUID + ")";
Note: This issue arises when lookup attribute of the entity can accept multiple types of entity references below are common examples
1. Customer on Incident
2. Customer on Contact
3. Customer type field on Custom Entity.
Liked it? Share it.