Question

We are using a third-party MS Dynamics hosting and we send data to them using Dynamics API web services "CrmService."

When we call the "Create" method it appears as though the call was success as the Dynamics server returns a GUID back to the caller. Looking the CrmService code below it tells me that the that's exactly what I should get if there are no errors.

However, the record itself is missing in Dynamics. The record is nowhere to be found. So the questions are:

1) Any theories (beside aliens) as to what might happened to the record that I got the GUID for?

2) How would want go about debugging such a thing considering that I don't have an access to the dynamic server itself?

3) What would be a good set of troubleshooting steps that the hosting service should perform to debug this issue (did you check that? or this? etc.)?

public System.Guid Create(BusinessEntity entity) {
    object[] results = this.Invoke("Create", new object[] {
        entity});
        return ((System.Guid)(results[0]));
}
Was it helpful?

Solution

I know of two probable causes:

Scenario 1

It is interesting you "are using a third-party MS Dynamics hosting". It probably means you are sharing the CRM Servers with other tenants (CRM organization databases). In these kind of environments problems can occur when plugins have not been designed to be thread-safe.

I have seen plugins that would actually garble data of concurrently processed requests. Sources of these errors can e.g. be autonumbering plugin products, shared by multiple tenants in the same deployment. Autonumbering plugins are typically triggered on the creation of records. It is not impossible your records ended up in another database.

Scenario 2

You have a workflow in your system that is triggered (directly or indirectly) by the creation of your record deleting your record. Asynchronous plugins can actually also be a suspect.

Asynchronous processes run outside the original transaction scope, so your code does not necessarily have to be aware of it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top