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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Sync workflow failed with error message

(0) ShareShare
ReportReport
Posted on by

Hello there. In our system we have some workflow, that should be synchronious (with starting by user). When user start such workflow, he can get an error message, signalized, that some condition for record was failed (like an error message).

But in the same time this workflows can be started for a list of records. In that way, if some condition failed for some record, we have record in processsession table with some information, including reasone of failure (this is about what we get from comment), but information in that column is a little bit unreadable for single user.

So, what I want: Is there a convinient way to parse this comment, so it could be like friendly, readable message (like when when user start workflow for single record and got workflow step error).

For example, we have this in comment from processsession:

Sync workflow failed with error message - Unhandled Exception: System.Activities.Statements.WorkflowTerminatedException: Process should be started from active Opportunity
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)
Inner Exception: Microsoft.Xrm.Sdk.InvalidPluginExecutionException, error code - -2147220970

And I want to have only this: "Process should be started from active Opportunity"

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Ben Thompson Profile Picture
    6,350 on at

    The error message you refer to is from deep inside the internals of Dynamics 365 so it's not going to be possible to customise and change it.

    And while it's not possible to edit the message I also don't think it would be the correct approach even if you could. What you should be doing is identifying what the actual errors are and handling the known ones you don't care about at the top of the workflow by catching the possible cases and stopping the workflow before it creates the error.

    7266.Screenshot_5F00_8.png

  • Community Member Profile Picture
    on at

    Well, definitly this i do in my workflow, like on ur screenshot

    processsession.PNG

    When user start workflow, he can get exception with message about such case. All cases already recorded in workflow steps. And all works great, when user start workflow for single record (for examle for single opportunity).

    But when user do it for list of records, he couldn't see possible errors for this list, that can be occured by some case, that mentioned in workflowstep (for example: if workflow canceled). Nevertheless all such falls have been writen in crm table, called processsession, and messeges, that user usally see in error messege window, put in column, named, comments (like on scrinshot):

    processsession.PNG

    So, i can get this information, and even get error (reasone of workflow failed). The only thing i should do - is to parse this to normal readable view (like message in error message window). That's why i asked - is there any convinient parser for this/

  • Community Member Profile Picture
    on at

    Well, something tells me, that i will do it by myself (don't want TT.TT)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Varsha deshpande Profile Picture

Varsha deshpande 5

#2
JS-09031509-0 Profile Picture

JS-09031509-0 3

#3
Ciprian  P Profile Picture

Ciprian P 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans