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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Reactivate Business Process Flow

(0) ShareShare
ReportReport
Posted on by 130

In my project, I have this Business Process Flow. At Closure, it reaches the Finished status.

2620.Capture.JPG

I can reactivate it from the command bar, like this.

Reactivate-BPF.jpg

How can I reactivate it programmatically as I need to perform some more action on Re-Activation?

Javascript (Xrm.Page.data) or SDK code reference will be a great help.

*This post is locked for comments

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

    Hi Atul,

    You can create a ribbon button and add a javascript on it to do the following:

    Xrm.Page.getAttribute("stageid").setValue(GuidOfTheFirstStageOfYourBusinessProcessFlow);

    And then you can perform your own operations as well.

  • Verified answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi Atul Sharma,

    You can programmatically set the status of the business process flow using the javascript code below.

    Xrm.Page.data.process.setStatus(status, callbackFunction);

    status is a string that can be active, abandoned or finishcallbackFunction is an optional function to call when the operation is complete.

    In order to reactivate the workflow, use the status active as shown below.

    Xrm.Page.data.process.setStatus("active");

    For more details, see the links below.

    https://stackoverflow.com/questions/43346218/programatically-finishing-business-process-flow-in-dynamics-crm-365

    https://msdn.microsoft.com/en-gb/library/dn817878.aspx#BKMK_InstanceMethods

    Hope this helps.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans