Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Exception on load of Audit History in Workflow

Posted on by Microsoft Employee

Hello Experts,

We are getting exception on load of Audit History of Workflow in CRM 2016 environment. Recently we upgraded from CRM 2011 to CRM 2016 (on-premise). This exception recorded for few workflows as for others it is fine. I am attaching the screenshot of exception and the event log for error from CRM server.

Error in MSCRMWebService

The Web Service plug-in failed in OrganizationId: 6d1c0dde-345f-44d3-966d-e525599cabef; SdkMessageProcessingStepId: 98151a8e-8ed7-4b27-926d-16073af4c3d3; EntityName: audit; Stage: 30; MessageName: RetrieveRecordChangeHistory; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider)
at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
Inner Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)
at Microsoft.Crm.ObjectModel.AuditService.GetLocalizedAttributeValueFromBusinessDataLocalizedLabelTable(EntityMetadata entityMetadata, Guid objectId, Int32 languageCode, AttributeMetadata attributeMetadata, ExecutionContext context)
at Microsoft.Crm.ObjectModel.AuditService.FillNewValuesInAuditDetails(AttributeAuditDetail auditDetail, BusinessEntity auditEntity, BusinessEntity baseEntity, BusinessEntityCollection beCollection, ExecutionContext context)
at Microsoft.Crm.ObjectModel.AuditService.CreateAuditDetailsForGeneralRecords(BusinessEntity auditEntity, BusinessEntity baseRecord, BusinessEntityCollection beCollection, ExecutionContext context)
at Microsoft.Crm.ObjectModel.AuditService.RetrieveAuditDetailsInternal(BusinessEntity auditEntity, BusinessEntity baseRecord, BusinessEntityCollection beCollection, ExecutionContext context)
at Microsoft.Crm.ObjectModel.AuditService.CreateAuditDetailCollection(BusinessEntityCollection beCollection, Int32 recordsToIgnore, BusinessEntity baseRecord, ExecutionContext context)
at Microsoft.Crm.ObjectModel.AuditService.RetrieveRecordChangeHistory(BusinessEntityMoniker moniker, PagingInfo pageInfo, ExecutionContext context)

Error in ASP.NET event

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 10/13/2017 4:30:25 AM
Event time (UTC): 10/13/2017 9:30:25 AM
Event ID: d6a5828966ab466aae43c364c7d057d8
Event sequence: 150044
Event occurrence: 24
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/2/ROOT-1-131522606503560739
Trust level: Full
Application Virtual Path: /
Application Path: C:\Program Files\Microsoft Dynamics CRM\CRMWeb\
Machine name: ************ 

Process information:
Process ID: 11620
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE

Exception information:
Exception type: CrmException
Exception message: An unexpected error occurred.
at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.XrmExecuteInternal()
at Microsoft.Crm.Application.Platform.ServiceCommands.RetrieveRecordChangeHistoryCommand.Execute()
at Microsoft.Crm.ApplicationQuery.RetrieveAuditByObjectCommand.RetrieveData()
at Microsoft.Crm.ApplicationQuery.ExecuteQuery()
at Microsoft.Crm.Application.Platform.Grid.GridDataProviderQueryBuilder.GetData(QueryBuilder queryBuilder)
at Microsoft.Crm.Application.Platform.Grid.GridDataProviderQueryBuilder.LoadQueryData()
at Microsoft.Crm.Application.Platform.Grid.GridDataProviderQueryBuilder.LoadData()
at Microsoft.Crm.Application.Platform.Grid.GridDataProviderBase.PrepareGridData()
at Microsoft.Crm.Application.Platform.Grid.GridDataProviderBase.PrepareData()
at Microsoft.Crm.Application.Controls.GridUIProvider.Render(HtmlTextWriter output)
at Microsoft.Crm.Application.Components.UI.Grid.DataGrid.RenderData(HtmlTextWriter output)
at Microsoft.Crm.Application.Components.UI.Grid.DataGrid.RenderInnerHtml(HtmlTextWriter output)
at Microsoft.Crm.Application.Components.UI.Grid.DataGrid.Render(HtmlTextWriter output)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at Microsoft.Crm.Application.Controls.AppAreaPage.RenderBodyInStrictMode(StringWriter writer)
at Microsoft.Crm.Application.Controls.AppAreaPage.Render(HtmlTextWriter output)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)



Request information:
Request URL: ********/.../areas.aspx{FD140AAF-4DF4-11DD-BD17-0019B9312238}&navItemName=Audit History&oId={94A09DF2-3806-4025-B05C-946C793A1BFC}&oType=4703&pagemode=iframe&rof=false&security=851973&tabSet=areaAudit
Request path: /***/sfa/workflow/areas.aspx
User host address: 192.168.10.65
User: **************** 
Is authenticated: True
Authentication Type: Negotiate
Thread account name: NT AUTHORITY\NETWORK SERVICE

Thread information:
Thread ID: 58
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.XrmExecuteInternal()
at Microsoft.Crm.Application.Platform.ServiceCommands.RetrieveRecordChangeHistoryCommand.Execute()
at Microsoft.Crm.ApplicationQuery.RetrieveAuditByObjectCommand.RetrieveData()
at Microsoft.Crm.ApplicationQuery.ExecuteQuery()
at Microsoft.Crm.Application.Platform.Grid.GridDataProviderQueryBuilder.GetData(QueryBuilder queryBuilder)
at Microsoft.Crm.Application.Platform.Grid.GridDataProviderQueryBuilder.LoadQueryData()
at Microsoft.Crm.Application.Platform.Grid.GridDataProviderQueryBuilder.LoadData()
at Microsoft.Crm.Application.Platform.Grid.GridDataProviderBase.PrepareGridData()
at Microsoft.Crm.Application.Platform.Grid.GridDataProviderBase.PrepareData()
at Microsoft.Crm.Application.Controls.GridUIProvider.Render(HtmlTextWriter output)
at Microsoft.Crm.Application.Components.UI.Grid.DataGrid.RenderData(HtmlTextWriter output)
at Microsoft.Crm.Application.Components.UI.Grid.DataGrid.RenderInnerHtml(HtmlTextWriter output)
at Microsoft.Crm.Application.Components.UI.Grid.DataGrid.Render(HtmlTextWriter output)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at Microsoft.Crm.Application.Controls.AppAreaPage.RenderBodyInStrictMode(StringWriter writer)
at Microsoft.Crm.Application.Controls.AppAreaPage.Render(HtmlTextWriter output)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Custom event details:

Screenshot of exception:

4061.error.PNG

 

 

 

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Exception on load of Audit History in Workflow

    Hi David,

    Actually this is happening only for few workflows and for other workflows this is working fine.

    And we have have only one language i.e. English for CRM environment.

    I am waiting for your reply.

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: Exception on load of Audit History in Workflow

    There's not a lot to go on, but the error below may indicate you've got missing option set labels, or maybe missing labels for some languages. If you have/had multiple languages, I'd check if they are installed correctly

    Inner Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
    at System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)
    at Microsoft.Crm.ObjectModel.AuditService.GetLocalizedAttributeValueFromBusinessDataLocalizedLabelTable(EntityMetadata entityMetadata, Guid objectId, Int32 languageCode, AttributeMetadata attributeMetadata, ExecutionContext context)

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans