Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Error creating a call in Microsoft Dynamics

Posted on by Microsoft Employee

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": "+34 919 01 61 69"
},
{
"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 +34xxxxxxx",
"_accountid_value": null,
"_ownerid_value": "c12f57db-1dc0-e911-a864-000d3a45a317",
"contactid": "2701403f-fa05-ea11-a811-000d3a49dd7d"
}

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error creating a call in Microsoft Dynamics

    Thanks for your response!

    This is all I have for the input...

    the weird thing is that I do the exact same thing with another Microsoft Dynamics account, but there it works.

    Input for the other Microsoft Dynamics Account:

    {
    "access_token": "ey... <**--removed--**>",
    "entity_set_name": "phonecalls",
    "party_list": [
    {
    "entity_type": "partyid_contact",
    "participation_type_mask": 1,
    "value": "2bc5b42c-96f5-e911-a813-000d3a2d0171"
    },
    {
    "entity_type": "partyid_systemuser",
    "participation_type_mask": 2,
    "value": "5c757ca9-b836-e911-a839-000d3a2bd251"
    }
    ],
    "instance_url": "ht... <**--removed--**>",
    "fields": [
    {
    "field": "subject,String",
    "value": "Missed call on Paul Direct"
    },
    {
    "field": "phonenumber,String",
    "value": "+1 850-558-5520"
    },
    {
    "field": "directioncode,Boolean",
    "value": true
    },
    {
    "field": "actualstart,DateTime",
    "value": "2019-11-13T13:39:31.000Z"
    },
    {
    "field": "actualend,DateTime",
    "value": "2019-11-13T13:40:01.000Z"
    },
    {
    "field": "actualdurationminutes,Integer",
    "value": 1
    },
    {
    "field": "regardingobjectid@odata.bind,Lookup",
    "value": "2bc5b42c-96f5-e911-a813-000d3a2d0171",
    "target_type": "contacts"
    }
    ]
    }

    Output for the other Microsoft Dynamics account - where it works:

    {
    "id": "99942728-1b06-ea11-a811-000d3a2d0171"
    }

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: Error creating a call in Microsoft Dynamics

    The error indicates that for one of the fields you are specifying ses_equipmentcontactrecord as the target type, rather than contact as the target type, and 2701403f-fa05-ea11-a811-000d3a49dd7d as the id. However I can't see ses_equipmentcontactrecord specified in your input value - is there other data or code you can post ?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans