I get the following error when using the "Create Call" endpoint from the Dynamics 365 URL:
{
"response": {
"statusCode": 404,
"body": {
"error": {
"code": "0x80040217",
"message": "ses_equipmentcontactrecord With Id = 2701403f-fa05-ea11-a811-000d3a49dd7d Does Not Exist",
"innererror": {
"message": "ses_equipmentcontactrecord With Id = 2701403f-fa05-ea11-a811-000d3a49dd7d Does Not Exist",
"type": "System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]",
"stacktrace": " at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.CreateInternal(Entity entity, InvocationContext invocationContext, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, Dictionary`2 optionalParameters)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataExecutionContext.CreateOrganizationResponse(Entity entity)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataServiceDataProvider.CreateEdmEntity(CrmODataExecutionContext context, String edmEntityName, EdmEntityObject entityObject, Boolean isUpsert)\r\n at Microsoft.Crm.Extensibility.OData.EntityController.PostEntitySetImplementation(String& entitySetName, EdmEntityObject entityObject)\r\n at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func, IEnumerable`1 additionalCustomProperties)\r\n at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"
}
}
}
},
"expects": {
"statusCode": [
204
]
},
"message": "Not found. Looks like this has been removed."
}
Here is the input value I had:
{
"access_token": "ey... <**--removed--**>",
"entity_set_name": "phonecalls",
"party_list": [
{
"entity_type": "partyid_contact",
"participation_type_mask": 1,
"value": "2701403f-fa05-ea11-a811-000d3a49dd7d"
},
{
"entity_type": "partyid_systemuser",
"participation_type_mask": 2,
"value": "aaae99b2-e2c1-e911-a859-000d3a2fe6cc"
}
],
"instance_url": "ht... <**--removed--**>",
"fields": [
{
"field": "subject,String",
"value": "Inbound answered call on Número Mauricio"
},
{
"field": "phonenumber,String",
"value": " "
},
{
"field": "directioncode,Boolean",
"value": true
},
{
"field": "actualstart,DateTime",
"value": "2019-11-13T09:44:47.000Z"
},
{
"field": "actualend,DateTime",
"value": "1970-01-01T00:00:00.000Z"
},
{
"field": "actualdurationminutes,Integer",
"value": 0
},
{
"field": "regardingobjectid@odata.bind,Lookup",
"value": "2701403f-fa05-ea11-a811-000d3a49dd7d",
"target_type": "contacts"
}
]
}
The contact with the ID not found does seem to exist, because when I use the "Get Contact" endpoint I get a contact with the same ID:
Get Contact output:
{
"@odata.context": "">xxxxxxx.crm4.dynamics.com/.../$metadata
"@odata.etag": "W/\"8207943\"",
"_masterid_value": null,
"fullname": "Aircall New Contact ",
"_accountid_value": null,
"_ownerid_value": "c12f57db-1dc0-e911-a864-000d3a45a317",
"contactid": "2701403f-fa05-ea11-a811-000d3a49dd7d"
}