I configured a simple workflow which checks if parent account field is filled and throws an error when it is not.
But the workflow shows the following error instead:
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
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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,522 Super User 2024 Season 2
Martin Dráb 228,441 Most Valuable Professional
nmaenpaa 101,148