简体   繁体   English

Microsoft Dynamics crm api-update 子公司 parentaccountid

[英]Microsoft Dynamics crm api-update child company parentaccountid

Trying to update a account _parentaccountid_value.尝试更新帐户 _parentaccountid_value。

The request url is: https://alliedmodulartemp.api.crm.dynamics.com/api/data/v9.1/accounts(accountid)请求网址为: https : //alliedmodulartemp.api.crm.dynamics.com/api/data/v9.1/accounts(accountid)

Method:PATCH方法:补丁

Data: { "_parentaccountid_value@odata.bind": "/accounts(accountid)"数据:{“_parentaccountid_value@odata.bind”:“/accounts(accountid)”

} }

But the error is,"message": "An error occurred while validating input parameters: Microsoft.OData.ODataException: A property '_parentaccountid_value' which only has property annotations in the payload but no property value is declared to be of type 'Edm.Guid'.但错误是,“消息”:“验证输入参数时发生错误:Microsoft.OData.ODataException:属性'_parentaccountid_value'在有效负载中只有属性注释,但没有属性值被声明为类型'Edm。指导'。

You do not need _parentaccountid_value rather you need _parentaccountid.您不需要_parentaccountid_value 而需要_parentaccountid。 Try below code and it shall work.试试下面的代码,它会工作。

Data: { "_parentaccountid@odata.bind": "/accounts(accountid)"

}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM