Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Execute Failed Workflow

(0) ShareShare
ReportReport
Posted on by 6,205

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

  • Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: Execute Failed Workflow

    Hi Shahbaaz Ansari,

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

  • Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,205 on at
    RE: Execute Failed Workflow

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

  • Suggested answer
    Flydancer Profile Picture
    Flydancer 1,332 on at
    RE: Execute Failed Workflow

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

  • Suggested answer
    Mahadeo Matre Profile Picture
    Mahadeo Matre 17,021 on at
    RE: Execute Failed Workflow

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

  • Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,205 on at
    RE: Execute Failed Workflow

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

  • Shahbaaz Ansari Profile Picture
    Shahbaaz Ansari 6,205 on at
    RE: Execute Failed Workflow

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

  • Suggested answer
    Flydancer Profile Picture
    Flydancer 1,332 on at
    RE: Execute Failed Workflow

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

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,407 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans