Hi all,
Hoping someone may be able to help. Using Dynamics 365 online, I'm get an error message every time I try to open or create a Lead. Error details below. This prevents me from opening the form in any way. This has occurred due to some customisation, but I can't think what specifically may have caused it.
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Crm.Application.InlineEdit.JsonWrapperFactory.CreateForStatusAttribute(StatusAttributeMetadata attributeMetadata, String entityLogicalName)
at Microsoft.Crm.Application.InlineEdit.JsonWrapperFactory.Create(AttributeMetadata attributeMetadata, String entityLogicalName)
at Microsoft.Crm.Application.InlineEdit.JsonWrapperFactory.CreateEntityWrapper(Int32 entityTypeCode, String formId, ICollection`1 attributesOnForm, ICollection`1 unboundControlsOnForm)
at Microsoft.Crm.Application.InlineEdit.ReadFormDataBuilder.RetrieveFormattedEntityMetadata()
at Microsoft.Crm.Application.Pages.Common.ReadLayoutPage.WriteEntityMetadata(TextWriter writer)
at Microsoft.Crm.Application.Pages.Common.ReadLayoutPage.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously): Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #579D3E79Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ActivityId>49bb9a08-d624-4db4-b6fb-89800d35a1de</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Crm.Application.InlineEdit.JsonWrapperFactory.CreateForStatusAttribute(StatusAttributeMetadata attributeMetadata, String entityLogicalName)
at Microsoft.Crm.Application.InlineEdit.JsonWrapperFactory.Create(AttributeMetadata attributeMetadata, String entityLogicalName)
at Microsoft.Crm.Application.InlineEdit.JsonWrapperFactory.CreateEntityWrapper(Int32 entityTypeCode, String formId, ICollection`1 attributesOnForm, ICollection`1 unboundControlsOnForm)
at Microsoft.Crm.Application.InlineEdit.ReadFormDataBuilder.RetrieveFormattedEntityMetadata()
at Microsoft.Crm.Application.Pages.Common.ReadLayoutPage.WriteEntityMetadata(TextWriter writer)
at Microsoft.Crm.Application.Pages.Common.ReadLayoutPage.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously): Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #579D3E79</Message>
<Timestamp>2018-09-26T09:47:01.3118089Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault>
<ActivityId>49bb9a08-d624-4db4-b6fb-89800d35a1de</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d3p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Crm.Application.InlineEdit.JsonWrapperFactory.CreateForStatusAttribute(StatusAttributeMetadata attributeMetadata, String entityLogicalName)
at Microsoft.Crm.Application.InlineEdit.JsonWrapperFactory.Create(AttributeMetadata attributeMetadata, String entityLogicalName)
at Microsoft.Crm.Application.InlineEdit.JsonWrapperFactory.CreateEntityWrapper(Int32 entityTypeCode, String formId, ICollection`1 attributesOnForm, ICollection`1 unboundControlsOnForm)
at Microsoft.Crm.Application.InlineEdit.ReadFormDataBuilder.RetrieveFormattedEntityMetadata()
at Microsoft.Crm.Application.Pages.Common.ReadLayoutPage.WriteEntityMetadata(TextWriter writer)
at Microsoft.Crm.Application.Pages.Common.ReadLayoutPage.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint): Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #AF6AF6AC</Message>
<Timestamp>2018-09-26T09:47:01.3118089Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>
Any help appreciated.
*This post is locked for comments
Combination of the two answers above has done the trick. Many thanks.
Hi Michael,
By any chance do you have a environment where it is stable?
Try to take a solution from there containing the lead entity ( with correct status reasons , forms etc)
You still getting the same error? Try publish all customization and try it in a new browser/ inprivate mode ( if not done already )
Hi Ravi, I have reset the status reason field back to OOB state, this hasn't worked though I'm afraid.
Hi,
Based the stack trace, it looks like you have customized the status reason. I would suggest to check the ststaus reasons and if possible revert the changes and see if this resolve your issue. Possible that you have renamed some out of box status which may be hardcoded in the system and when CRM trying to search it, it couldn't find it and thus throwing null reference exception.
Hope this helps.
We have no JS on the form.
Please check, Is there any Java script on load of form. If yes then disable it and try to open form.
After that update you Java script.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156