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)

Execute Failed Workflow

(0) ShareShare
ReportReport
Posted on by 6,211

Hi All,

i want to trigger workflow which failed for the records for some reason, i am creating console to execute all those workflow which failed.

below is the class i am using to execute it, but it is doing nothing.

var request = new ExecuteWorkflowRequest()
{
EntityId = res.GetAttributeValue<EntityReference>("regardingobjectid").Id,
WorkflowId = workflowID
};
var res1= service.Execute(request);

Any help would be appreciated.

Thanks,

Shahbaaz

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Flydancer Profile Picture
    1,332 on at

    Here is a great article for your case with sample code www.powerobjects.com/.../execute-failed-workflow-crm-executeworkflowrequest-console-application

  • Shahbaaz Ansari Profile Picture
    6,211 on at

    thanks for the reply, i have check that, it is showing me error that workflow show be ondemand or run as child process.

  • Shahbaaz Ansari Profile Picture
    6,211 on at

    i have made it ondemand, but now other issue is i am getting is "workflow must be in published state"

  • Suggested answer
    Mahadeo Matre Profile Picture
    17,021 on at

    when you are executing workflow from code.. workflow should be on-demand or run as child workflow, and need to activated.

  • Suggested answer
    Flydancer Profile Picture
    1,332 on at

    Please make sure that the workflow is activated. It should work right after activating it

  • Shahbaaz Ansari Profile Picture
    6,211 on at

    Mahadeo/Flydancer :  my workflow is on demand and also it is activated and published

  • Alex Fun Wei Jie Profile Picture
    33,628 on at

    Hi Shahbaaz Ansari,

    let mark the answer as verified and continue the rest of topic in your new thread.

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans