gpt4 book ai didi

dynamics-crm - 动态 - 使用 API 创建任务

转载 作者:行者123 更新时间:2023-12-02 00:45:54 25 4
gpt4 key购买 nike

    {Method: POST, RequestUri: 'https://cmpanydynamicsurl.com/api/data/v8.2/tasks', Version: 1.1, Content: System.Net.Http.StringContent, 
Headers:
{
OData-MaxVersion: 4.0
OData-Version: 4.0
Accept: application/json
Content-Type: application/json; charset=utf-8
Content-Length: 162
}}

使用上述请求,我尝试使用 Dynamics API post action 针对帐户创建任务。

正在发送 Json 模型 -

 {
"subject":"NEW TEST TASK FOR ACCOUNT",
"_regardingobjectid_value@odata.bind":"/accounts(08b582ad-4e2f-e711-8101-5065f38a4a21)"
}

我收到此错误消息并且没有成功搜索互联网?

A property '_regardingobjectid_value' which only has property annotations in the payload but no property value is declared to be of type 'Edm.Guid'. In OData, only navigation properties and named streams can be represented as properties without values.

最佳答案

正确的负载是

{
"subject": "NEW TEST TASK FOR ACCOUNT",
"regardingobjectid_account@odata.bind": "/accounts(08b582ad-4e2f-e711-8101-5065f38a4a21)"
}

您必须以某种方式告诉您要绑定(bind)到哪个对象类型,因为 regardingobjectid 有多种类型,并且每种类型都有自己独立的关系(在本例中为 regardingobjectid_account)。您正在尝试将值绑定(bind)到一个普通的“Guid”属性(因为“_regardingobjectid_value”是一个“Guid”),但此类属性的分配应与您对主题所做的完全相同,因此只需 "_regardingobjectid_value": "08b582ad-4e2f-e711-8101-5065f38a4a21" 但这不起作用,因为您没有提供实体类型。

关于dynamics-crm - 动态 - 使用 API 创建任务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43938566/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com