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)

Business Process Flow - Workflow on stage exit - only run when progressing forward

(0) ShareShare
ReportReport
Posted on by 102

Hi All

I have a series of workflows that trigger on stage exit, all running well.

I want to prevent them from running though if the BPF stage is moving backward, ie, the user has activated a previous stage or pressed "Previous" from the BPF navigation.

I have thought about an integer field in the record and then calling a plugin/realtime workflow that updates this field on every change of stage. then the target workflow will check this stage num at the start of the process and exit out early if stage num in the record is >= x (x being the predetermined stage for the workflow in the process)

This will be some work not only to implement but to maintain as its not dynamic and will require updates to the workflows if the BPF changes at all (new stages introduced etc)

Is there a better or cleaner way to fix this issue?

Regards

Nick

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    NODAL Profile Picture
    860 on at

    Hi,

    You can use traverse path of BPF to validate movement of BPF stages.

    1) store traverse path of record or

    2) write and call a custom action on top of your workflow to validate traverse path.

    Regards,

    Ketan

  • erhan.keskin Profile Picture
    2,253 on at

    Hi,

    You can use traversepath as Ketan mentioned.

    And also, you can use "Xrm.Page.data.process.getActivePath();" to get the path, and check where you are.

    Check if you need an example; https://docs.microsoft.com/en-us/previous-versions/dynamicscrm-2016/developers-guide/dn817884%28v%3dcrm.8%29

    Regards,

  • nwood Profile Picture
    102 on at

    Thanks Erhan and Ketan

    Unfortunately it seems as though traverse path only shows you where you are currently not where you have been, so if you go from stage 1 to 5 in order, then back to stage 3 it only shows you stage 1,2,3 in traverse path, not 1,2,3,4,5,3 so I cant use this to determine that the user has gone backward.

    I will come at it from another angle

  • erhan.keskin Profile Picture
    2,253 on at

    Did you sort it out? I know it would not be ideal but you can check the stage name in WF, and stop WF if it is not the expected stage.

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