Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Getting the following error from a workflow instance: "An open execution context was found but did not match organization for current SDK call"

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

We recently migrated an organization to Microsoft Dynamics 2016.   Serveral of the workflow instances we've ran are stuck in a waiting state with the following error:

"An open execution context was found but did not match organization for current SDK call"

Has anyone else encountered this?

Stack trace:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: An open execution context was found but did not match organization for current SDK callDetail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>An open execution context was found but did not match organization for current SDK call</Message>
<Timestamp>2016-12-19T04:30:21.1057215Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Retrieve(EntityReference entityReference, ColumnSet columnSet, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode)
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.LookupEntry(TKey key, IOrganizationContext context)
at Microsoft.Crm.Workflow.ActivityHostBase.StartWorkflow(ICommonWorkflowContext context)

*This post is locked for comments

  • Suggested answer
    Nadeeja Bomiriya Profile Picture
    Nadeeja Bomiriya 6,804 on at
    RE: Getting the following error from a workflow instance: "An open execution context was found but did not match organization for current SDK call"

    Hi Crispin,

    I believe you have a custom workflow activity which refers to a different CRM organisation.

    You could enable Trace from Settings > Plug-In Trace Logs to see more information.

    Please provide a screenshot which will help with troubleshooting.

    You can also try republishing the custom workflow activities.

    Cheers,

    Nadeeja

    If the answer solves your problem, please mark as Verified. Thanks.

    My Blog: http://dyn365apps.com/ - Follow me on Twitter: https://twitter.com/dyn365apps

    LinkedIn: https://www.linkedin.com/in/nadeeja

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