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 :
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)
  • Alex Fun Wei Jie Profile Picture
    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
    6,211 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
    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
    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
    6,211 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
    6,211 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
    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

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans