Microsoft Dynamics CRM

{Error Resolution}The case of the form which stopped loading in Dynamics CRM!

Recently in my project, one of the form just stopped loading. Like somebody told it to:

image

Form was opening properly on Form customization though!

Below is the error trace:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #05D793E1Detail:

<OrganizationServiceFault xmlns:i=”http://www.w3.org/2001/XMLSchema-instance&#8221; xmlns=”http://schemas.microsoft.com/xrm/2011/Contracts”&gt;

<ErrorCode>-2147220970</ErrorCode>

<ErrorDetails xmlns:d2p1=”http://schemas.datacontract.org/2004/07/System.Collections.Generic&#8221; />

<Message>System.Web.HttpUnhandledException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #05D793E1</Message>

<Timestamp>2015-09-16T14:36:52.2295028Z</Timestamp>

<InnerFault>

<ErrorCode>-2147220970</ErrorCode>

<ErrorDetails xmlns:d3p1=”http://schemas.datacontract.org/2004/07/System.Collections.Generic&#8221; />

<Message>System.NullReferenceException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #8D983CA7</Message>

<Timestamp>2015-09-16T14:36:52.2295028Z</Timestamp>

<InnerFault i:nil=”true” />

<TraceText i:nil=”true” />

</InnerFault>

<TraceText i:nil=”true” />

</OrganizationServiceFault>

Trying to find out the cause, I remembered that one of the developers had recently changed the type for one of the fields but kept the field name exactly the same from the last one. The change was from type lookup to option set. When I quickly downloaded the formxml, I found that the type there references was still an old one, so during rendering the form engine was going for the toss.

So, to resolve this one was just to remove the field from the form designer, save and publish. Again add the field, save and Publish.

How this happened? Seems two developers were publishing the same form, one with the old type and another with the new one. The last right was old form xml because it was not refreshed for a while. I think Dynamics CRM should match types before publish though!

Anyways, Hope it helps and Happy CRMing!