Lets asume we have a Account entity in Dynamics 365, account have c5 number and name attributes.
Now i want to create a new account through the dynamics 365 Web API. I create an account object with c5 number, name and i add an aditional attribute lastname. When i post this account object to Web API, i will get an error like :
"code":"","message":"The property 'lastname' does not exist on type 'Microsoft.Dynamics.CRM.account'. Make sure to only use property names that are defined by the type.","innererror":{
"message":"The property 'lastname' does not exist on type 'Microsoft.Dynamics.CRM.account'. Make sure to only use property names that are defined by the ...
I really dont uderstand why Dynamics 365 Web API just cant ignore property's which it cant use?
At this specific scenarion it means that if we delete name property on the account entity, there are possibility that all our systems which talks to the Web API will crash.
How can i get around this problem? Are there anyway to force dynamics 365 Web API to ignore some propertys?
POST
to only include the attributes that are provided in the instance you are connected to. Seems like a likely candidate given the description on MSDN - msdn.microsoft.com/en-us/library/mt607522.aspx#Retrieving attributes Some SO answers show how to go about this too. – Mr Moosenew ColumnSet(true)
(SELECT * FROM) which will yield an entity instance that has all valid attributes. Reset its ID to null, update attributes as needed and.Create()
it. Use at own risk. I'd still recommend to decide touching attributes based on the entity (logical name) and/or entity metadata. – Filburt