Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Lead form not opening.

Posted on by 155

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. ---&gt; 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&amp; 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

  • Michael Violette Profile Picture
    Michael Violette 155 on at
    RE: Lead form not opening.

    Combination of the two answers above has done the trick. Many thanks.

  • Verified answer
    Rawish Kumar Profile Picture
    Rawish Kumar 13,756 on at
    RE: Lead form not opening.

    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)

  • Verified answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Lead form not opening.

    You still getting the same error? Try publish all customization and try it in a new browser/ inprivate mode ( if not done already )

  • Michael Violette Profile Picture
    Michael Violette 155 on at
    RE: Lead form not opening.

    Hi Ravi, I have reset the status reason field back to OOB state, this hasn't worked though I'm afraid.

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Lead form not opening.

    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.

  • Michael Violette Profile Picture
    Michael Violette 155 on at
    RE: Lead form not opening.

    We have no JS on the form.

  • Dynamics365 Rocker Profile Picture
    Dynamics365 Rocker 7,755 on at
    RE: Lead form not opening.

    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.

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans