我正在尝试使用Dynamics 365 Web API从约会中删除“必需方”和“可选方”。我尝试使用“ activityparties”实体删除值,但没有运气。
请求:
DELETE https://xxxxxx.crm.dynamics.com/api/data/v8.2/appointments(EE4C7268-81B7-E811-8143-3863BB368D98)/activitypointer_activity_parties_required(79ea68eb-4304-e911-8147-3863bb2eb450)
响应: 400错误请求
{
"error": {
"code": "",
"message": "Request message has unresolved parameters.",
"innererror": {
"message": "Request message has unresolved parameters.",
"type": "Microsoft.Crm.CrmHttpException",
"stacktrace": " at Microsoft.Crm.Extensibility.OData.CrmODataRoutingConvention.SelectAction(ODataPath odataPath, HttpControllerContext controllerContext, ILookup`2 actionMap)\r\n at System.Web.OData.Routing.ODataActionSelector.SelectAction(HttpControllerContext controllerContext)\r\n at System.Web.Http.ApiController.ExecuteAsync(HttpControllerContext controllerContext, CancellationToken cancellationToken)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"
}
}
}
答案 0 :(得分:0)
请求中的导航属性可能错误。肯定没有activitypointer_activity_parties_required
。
尝试一下:(我尚未测试过,可以在CRM REST Builder中进行测试)
DELETE https://xxxxxx.crm.dynamics.com/api/data/v8.2/appointments(EE4C7268-81B7-E811-8143-3863BB368D98)/activitypointer_activity_parties(79ea68eb-4304-e911-8147-3863bb2eb450)
activitypointer_activity_parties
更新:
好像我们无法实现您想要的。我玩了一下,什么都没找到,但是找到了。创建后,我们无法对ActivityParty记录执行任何操作,您必须先在表单脚本中对其进行操作,或者在存储在数据库中之前预先创建插件本身。
实体集路径[组织URI] /api/data/v9.0/activityparties
基本类型crmbaseentity
显示名称活动方
主键activitypartyid
主键属性partyidname
支持的操作GET(仅限RetrieveMultiple)