web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

An unexpected error occurred from ISV code.

(0) ShareShare
ReportReport
Posted on by

I configured a simple workflow which checks if parent account field is filled and throws an error when it is not.

pastedimage1625101524848v2.png

But the workflow shows the following error instead:

pastedimage1625101396904v1.png

Stack Trace:

Sync workflow failed with error message - Unhandled exception:
Exception type: Microsoft.Xrm.Sdk.InvalidPluginExecutionException
Message:

-- End stack trace --

Exception type: System.Activities.Statements.WorkflowTerminatedException
Message: To move to next sales stage, Customer Account is required.
at System.Activities.WorkflowApplication.Invoke(Activity activity, IDictionary`2 inputs, WorkflowInstanceExtensionManager extensions, TimeSpan timeout)
at System.Activities.WorkflowInvoker.Invoke(Activity workflow, IDictionary`2 inputs, TimeSpan timeout, WorkflowInstanceExtensionManager extensions)
at Microsoft.Crm.Workflow.SynchronousRuntime.SynchronousWorkflowActivityHost.ExecuteWorkflowUsingInvoker(Activity workflow, ICommonWorkflowContext context)
at Microsoft.Crm.Workflow.SynchronousRuntime.SynchronousWorkflowActivityHost.StartWorkflow(WorkflowActivationData activationData, ICommonWorkflowContext context)
-- End stack trace --

, error code - -2147220970

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at
    RE: An unexpected error occurred from ISV code.

    Hi,

    that's because you stop the workflow with Canceled status, so you get the error box.

    try to stop it with Success, and you wouldn't get the error.

    in my opinion , in Canceled status write a descriptive message, so the error will be readable, but for sure its all about your business and what you and your client want.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 182

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 125 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans