CRM do not support direct update of Entity Reference properties, Use Navigation properties instead

只谈情不闲聊 提交于 2019-12-04 04:15:42

Well, it is possible, but you need to use the special "@odata.bind" syntax to update your single-navigation properties.

For example, to update an account so that it references an existing primarycontactid, you can use a PATCH operation to the /api/data/v8.2/accounts endpoint with the following body:

{
   "name":"Sample Account",
   "primarycontactid@odata.bind":"/contacts(00000000-0000-0000-0000-000000000001)"
}

See https://msdn.microsoft.com/en-us/library/gg328090.aspx#Anchor_3 (it is discussed in terms of creating an entity, but it works for updating as well).

I figure out the issue With Dynamc CRM you cannot directly update reference entities Field. You can identify reference entity properties start with "_".

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!