Microsoft Dynamics Crm an Error Has Occurred Try This Action Again
I came across a strange result inside Dynamics 365 that I'd never seen before this week. A customer had fabricated updates to the Condition Reason (statuscode) field on the Order entity and after the change was saved and published we could no longer open the field properties for the field from the customization area. Trying to open up the Status Reason gave the following mistake:
Error
An mistake has occurred.
Try this action again. If the problem continues, check the Microsoft Dynamics 365 Community for solutions or contact your organization's Microsoft Dynamics 365 Administrator. Finally, you can contact Microsoft Support.
It seems that after the change was published, the Status Reason field was corrupted. To brand matters worse the Order form would no longer open either. Downloading the log file from the course error gave the following information:
Unhandled Exception: Arrangement.ServiceModel.FaultException1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=nine.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.Spider web.HttpUnhandledException (0x80004005): Exception of blazon 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.at Microsoft.Crm.Awarding.InlineEdit.JsonWrapperFactory.CreateForStatusAttribute(StatusAttributeMetadata attributeMetadata, String entityLogicalName)at Microsoft.Crm.Awarding.InlineEdit.JsonWrapperFactory.Create(AttributeMetadata attributeMetadata, Cord entityLogicalName)
<ErrorCode>-2147220970</ErrorCode> <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
<Message>Arrangement.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an case 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.Awarding.InlineEdit.JsonWrapperFactory.CreateEntityWrapper(Int32 entityTypeCode, String formId, ICollection
1 attributesOnForm, ICollection`1 unboundControlsOnForm)at Microsoft.Crm.Application.InlineEdit.ReadFormDataBuilder.RetrieveFormattedEntityMetadata() at Microsoft.Crm.Awarding.Pages.Common.ReadLayoutPage.WriteEntityMetadata(TextWriter writer) at Microsoft.Crm.Awarding.Pages.Common.ReadLayoutPage.Render(HtmlTextWriter author) at Arrangement.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at Arrangement.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at Arrangement.Spider web.UI.Folio.HandleError(Exception e) at Organization.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Spider web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Folio.ProcessRequest() at System.Spider web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at Organisation.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) at Organisation.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously): Microsoft Dynamics CRM has experienced an fault. Reference number for administrators or support: #F865F716</Message>
The following information from the error stood out to me and confirmed that it was something to do with the condition:
CreateForStatusAttribute(StatusAttributeMetadata attributeMetadata, String entityLogicalName)
How to gear up it
Since at that place was no chance of opening the Status Reason field from the customization area to set up it, the only option was to export the metadata and set things via XML.
Examining the XML everything seemed Ok and the defaults for each status where legit values within the condition reason and I could spot cypher wrong with the status reason options.
To set up it I exported the aforementioned fields from an unmodified version for Dynamics 365 and replaced the <optionset> attributes for both the Status and Status Reason fields in my file.
The steps below outline the process I took to resolved it:
- Add the Status and Status reason fields for the problematic entity into a Solution and export it.
- Unzip the file and open Customizations.xml inside a text / XML editor
- Do the same process from an unmodified Dynamics 365 system.Note: I signed up for a trial version and did it from there.
- Replace the <optionset> aspect for the salesorder_statecode field with the values from the unmodified system
- Supplant the <optionset> attribute for thesalesorder_statuscode field with the values from the unmodified organization
- Zero the modified customizations.xml and all other associated files
- Import and publish the new zilch file
In one case the changes take been published, refresh your browser enshroud and retry opening the form and the Status Reason field. In one case confirmed everything is working again, retry the customizations.
FYI: Here are the values I used to supercede the <optionset> attributes on the Social club (salesorder) entity
salesorder_statecode:
one 2 iii 4 5 vi seven 8 9 10 11 12 13 xiv 15 16 17 18 19 xx 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | < optionset Name="salesorder_statecode" > < OptionSetType > state </OptionSetType > < IntroducedVersion > 5.0.0.0 </IntroducedVersion > < displaynames > < displayname description="Status" languagecode="1033" /> </displaynames > < Descriptions > < Description description="Status of the order." languagecode="1033" /> </Descriptions > < states > < country value="0" defaultstatus="1" invariantname="Active" > < labels > < characterization description="Active" languagecode="1033" /> </labels > </state > < land value="1" defaultstatus="3" invariantname="Submitted" > < labels > < label description="Submitted" languagecode="1033" /> </labels > </state > < country value="ii" defaultstatus="4" invariantname="Canceled" > < labels > < label description="Canceled" languagecode="1033" /> </labels > </state > < state value="3" defaultstatus="100001" invariantname="Fulfilled" > < labels > < label description="Fulfilled" languagecode="1033" /> </labels > </state > < land value="4" defaultstatus="100003" invariantname="Invoiced" > < labels > < label clarification="Invoiced" languagecode="1033" /> </labels > </land > </states > </optionset > |
salesorder_statuscode:
1 2 iii four 5 6 7 8 9 10 11 12 xiii xiv fifteen xvi 17 18 19 20 21 22 23 24 25 26 27 28 29 xxx 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | < optionset Name="salesorder_statuscode" > < OptionSetType > condition </OptionSetType > < IntroducedVersion > v.0.0.0 </IntroducedVersion > < displaynames > < displayname description="Status Reason" languagecode="1033" /> </displaynames > < Descriptions > < Description description="Reason for the status of the society." languagecode="1033" /> </Descriptions > < statuses > < status value="one" land="0" TransitionData="" Color="#0000ff" > < labels > < label description="New" languagecode="1033" /> </labels > </condition > < status value="2" state="0" TransitionData="" Color="#0000ff" > < labels > < characterization description="Processing" languagecode="1033" /> </labels > </status > < status value="3" state="1" TransitionData="" Color="#0000ff" > < labels > < label description="In Progress" languagecode="1033" /> </labels > </status > < condition value="4" country="2" TransitionData="" Color="#0000ff" > < labels > < characterization description="No Money" languagecode="1033" /> </labels > </condition > < status value="100001" state="3" TransitionData="" Color="#0000ff" > < labels > < label clarification="Complete" languagecode="1033" /> </labels > </condition > < status value="100002" state="iii" TransitionData="" Color="#0000ff" > < labels > < characterization description="Partial" languagecode="1033" /> </labels > </status > < status value="100003" country="4" TransitionData="" Colour="#0000ff" > < labels > < characterization clarification="Invoiced" languagecode="1033" /> </labels > </status > </statuses > </optionset > |
Good luck and feel complimentary to comment if y'all have any problems.
Contempo Posts
Source: https://functionalthoughts.com/dynamics-365-an-error-has-occurred-opening-field-properties/
0 Response to "Microsoft Dynamics Crm an Error Has Occurred Try This Action Again"
Post a Comment