Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Multiple Business Process Flows

  • 1.  Multiple Business Process Flows

    Posted Sep 21, 2021 06:45 PM
    I currently have two business process flows for an opportunity.  Opportunity Sales Process and a custom one "Consulting Services" .   My issue is that I want to update the opportunity with the current process stage which I have a custom field (Active Stage is the name).

    I have two Power Automate jobs that I am developing that look for changes to the BPF entity One for Opportunity Sales Process and one for Consulting Services. I then write the active stage from Processstages to the Active Stage field on the Opp.

    The issue I am having is finding out which bpf is actually active on the opp.  I know how to find it with javascript on the form, but how can I determine this through Power Automate?

    ------------------------------
    Mark Chaffee
    System Soft Technologies, Inc
    Tampa
    ------------------------------


  • 2.  RE: Multiple Business Process Flows

    GOLD CONTRIBUTOR
    Posted Sep 22, 2021 03:29 AM
    Hi Mark,
    A little bit of a long shot, but could you do something with a list rows action on the process entities (you'd have to do one list rows action for each BPF) and filter for process-status = Active in combination with the current opportunity (I think you could match on the unique ID).

    If the current opportunity can't be found in the first BPF list rows action, you could do the same search on the second BPF entity. Since there's ever only one active BPF on an Opportunity, this should yield the desired result. As a next step you could lookup the process stage and write the name of the stage in your stage field.

    I know I'm taking some shortcuts here, but maybe it gets you in the right direction. And maybe there are even better ways of doing this.

    good luck!

    ------------------------------
    Rogier Vriezen
    MS Cloud Consultant
    Amsterdam, Netherlands
    ------------------------------



  • 3.  RE: Multiple Business Process Flows

    SILVER CONTRIBUTOR
    Posted Sep 22, 2021 10:50 AM
    There used to be a field on the opportunity entity ProcessId which would give you what you're looking for. Also, you can find a corresponding record in the BPF entity and it will most certainly have the ProcessID of the BPF the opportunity is attached to.

    ------------------------------
    Tony Suslovich
    Sr. Business Analyst/Programmer
    Ove Arup and Partners International Ltd
    Edison NJ
    ------------------------------



  • 4.  RE: Multiple Business Process Flows

    TOP CONTRIBUTOR
    Posted 30 days ago
    Edited by Donal McCarthy 30 days ago
    I run the flow on the BPFs. The trigger is when a row is created in the BPF table or the active stage changes in a row in the table.
    I then set the active stage in a text field on a record. I also set the BPF table name.
    You can even use the table name as a variable in a List Records action to perform actions on the BPF like moving stages.



    ------------------------------
    Donal McCarthy
    Digital Marketing Administrator
    BrightWork
    Galway
    ------------------------------



If you've found this thread useful, dive deeper into User Group community content by role