Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested answer

CRM Async Service Fails

(0) ShareShare
ReportReport
Posted on by 630

Hello,

I'm facing an issue when a background job is being executed with the below error:

Host JobId: c736e46c-e61a-ec11-a32b-0050569af161 OrgId:451131bf-ab14-ec11-a328-0050569a2336 JobType:10; ErrorMessage:Unhandled Exception: System.IndexOutOfRangeException: ObjectTypeCode
at System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName)
at System.Data.SqlClient.SqlDataReader.GetOrdinal(String name)
at System.Data.SqlClient.SqlDataReader.get_Item(String name)
at Microsoft.Crm.ObjectModel.PrivilegeServiceInternal`1.RetrievePrivilegeMaxDepthFromTeamRoles(Guid userId, ExecutionContext context, Nullable`1 accessMode, Boolean excludeOrgDisabledPrivileges, Boolean includeSetupUserFiltering)
at Microsoft.Crm.Caching.UserDataCacheLoader.<>c__DisplayClass2_0.<LoadCacheData>b__0()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)
at Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheDataInternal(TKey key, Object existingDataContainer, IOrganizationContext context)
at Microsoft.Crm.Caching.ObjectModelCacheLoader`2.LoadCacheData(TKey key, IOrganizationContext context)
at Microsoft.Crm.Caching.CrmMultiOrgCacheBase`2.CreateEntry(TKey key, IOrganizationContext context)
at Microsoft.Crm.Caching.CrmMultiOrgCacheBase`2.<>c__DisplayClass19_0.<LookupEntry>b__2()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Caching.CrmMultiOrgCacheBase`2.LookupEntry(TKey key, IOrganizationContext context)
at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetUserInfoCommon(IOrganizationContext context, Guid userGuid, LocatorServiceContext locatorServiceContext)
at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetUserInfoInternal(WindowsIdentity identity, IOrganizationContext context, UserAuth& userInfo, LocatorServiceContext locatorServiceContext)
at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetCallerAndBusinessGuidsFromThread(WindowsIdentity identity, Guid organizationId, LocatorServiceContext locatorServiceContext, Guid systemUserId)
at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetCallerAndBusinessGuidsFromThread(WindowsIdentity identity, Guid organizationId)
at Microsoft.Crm.Extensibility.InternalSdkContextInitializer.SetHttpContext(WindowsIdentity windowsIdentity, Guid organizationId, Guid callerId)
at Microsoft.Crm.Extensibility.InprocessServiceProxy.RetrieveCore(String entityName, Guid id, ColumnSet columnSet)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.Retrieve(String entityName, Guid id, ColumnSet columnSet)
at Microsoft.Crm.Workflow.WorkflowLoader.LoadWorkflow(Guid workflowActivationId, IOrganizationContext context)
at Microsoft.Crm.Caching.WorkflowActivationCacheLoader.LoadCacheData(Guid key, IOrganizationContext context)
at Microsoft.Crm.Caching.CrmMultiOrgCacheBase`2.CreateEntry(TKey key, IOrganizationContext context)
at Microsoft.Crm.Caching.CrmMultiOrgCache`2.CreateAndAddEntryCallback(String itemkey, TValue value, IOrganizationContext context, Object parameter)
at Microsoft.Crm.CrmCache`1.AddEntry(String key, TValue value, IOrganizationContext context, AddEntryCallback`1 callback, Object callbackParameter)
at Microsoft.Crm.Caching.CrmMultiOrgCache`2.CreateAndAddEntryWithLock(TKey key, IOrganizationContext context)
at Microsoft.Crm.Caching.CrmMultiOrgCacheBase`2.<>c__DisplayClass19_0.<LookupEntry>b__1()
at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute(ILogger logger, EventId eventId, ActivityType activityType, Action action)
at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute(ILogger logger, XrmTelemetryActivityType activityType, Action action)
at Microsoft.Crm.Caching.CrmMultiOrgCacheBase`2.LookupEntry(TKey key, IOrganizationContext context)
at Microsoft.Crm.Workflow.ActivityHostBase.StartWorkflow(ICommonWorkflowContext context)
ErrorCode:0 ResultCode:10 Machine SPPW035: A Microsoft Dynamics CRM Asynchronous Processing Service operation of type %2 has failed
Organization ID: %3
Organization Unique Name: %4
Error code: %5
Error description: %6
  • Suggested answer
    Goutham A Profile Picture
    2 on at
    RE: CRM Async Service Fails

    I see its an issue with one of your asynchronous process- be it a plugin or custom workflow or custome action.

    From log shared, looks like the issue is tied to reference issues with Lookup or option set, like look up reference(guid) not resent or duplicate look up references.

  • Community Member Profile Picture
    on at
    RE: CRM Async Service Fails

    Hi,

    You can try to disable some plugins.

    If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.

    Best Regards,

    Frank Gong

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 51 Most Valuable Professional

#2
Ramesh Kumar Profile Picture

Ramesh Kumar 42

#3
David Shaw_UK Profile Picture

David Shaw_UK 27

Featured topics

Product updates

Dynamics 365 release plans