Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to automatically Finish a workflow

Posted on by 245

I have a workflow business process flow, and the last stage is called Certification, and this stage contains 3 required steps.

What I wanted to do is after I completed the 3 steps in the Certification stage, and save it, I want the stage to automatically FINISH, instead of manually clicking it.

Any ideas with using any custom code (plugin).

*This post is locked for comments

  • StefanS365 Profile Picture
    StefanS365 3,573 Most Valuable Professional on at
    RE: How to automatically Finish a workflow

    Hi Andrew,

    Quote from question: "What I wanted to do is after I completed the 3 steps in the Certification stage, and save it, I want the stage to automatically FINISH, instead of manually clicking it."

    So the 3 steps relate to 3 fields on the entity that is associated with this stage. You can use the on change trigger to start the workflow to set the status to Finished. See reference:

    community.dynamics.com/.../automate-business-process-flow-stages-using-workflows

  • RE: How to automatically Finish a workflow

    I tried to reply to the Accepted Answer but I don't any indication that my post was a reply. So let me give context. The workflow in the Accepted Answer, which sets the status reason to Finished, what triggers it?

  • RE: How to automatically Finish a workflow

    Thank you. What triggers the workflow?

  • Rodrigo.Cristo Profile Picture
    Rodrigo.Cristo 5 on at
    RE: How to automatically Finish a workflow

    Thanks by the help!

    it's working very well.

  • Verified answer
    RE: How to automatically Finish a workflow

    [quote user=""Benjamin"][/quote]

    I have a workflow business process flow, and the last stage is called Certification, and this stage contains 3 required steps.

    What I wanted to do is after I completed the 3 steps in the Certification stage, and save it, I want the stage to automatically FINISH, instead of manually clicking it.

    Any ideas with using any custom code (plugin).

  • StefanS365 Profile Picture
    StefanS365 3,573 Most Valuable Professional on at
    RE: How to automatically Finish a workflow

    Please confirm my suggested answer as Verified Answer, thanks.

  • Suggested answer
    RE: How to automatically Finish a workflow

    Stefan Strube Thanks!

  • Suggested answer
    Kokulan Profile Picture
    Kokulan 18,048 on at
    RE: How to automatically Finish a workflow

    Hi Benjamin,

    It looks like your requirement is to call the same function that is called when a user clicks on the Finish button.

    I don't think there a supported way to do this.

    You can use the Client Side library for BPF to move to next stage but there is no way support to call the Finish button click function.

    docs.microsoft.com/.../formcontext-data-process

    So i would say you wont be able to achieve this unless you have javascript that mimics the finish button click in an unsupported way.

  • Verified answer
    StefanS365 Profile Picture
    StefanS365 3,573 Most Valuable Professional on at
    RE: How to automatically Finish a workflow

    Add workflow action step: Change Status

    2019_2D00_02_2D00_04-12_5F00_15_5F00_05_2D00_Window.png

    Set Status (Reason) to: Finished

    2019_2D00_02_2D00_04-12_5F00_15_5F00_42_2D00_Window.png

    Done.

  • RE: How to automatically Finish a workflow

    I'm not referring to moving to the last stage, I'm referring on how to trigger the FINISH button on the last stage of my BPF.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans