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 :
Customer experience | Sales, Customer Insights,...
Suggested answer

Change BPF (Business Process Flow) to another BPF on update of record

(1) ShareShare
ReportReport
Posted on by 112
Hello together,
 
I use the Lead to Opportunity Sales Process (Sales BPF) and the Lead to Opportunity (Marketing BPF) Business Process Flows on the lead entity.
 
I would like to change from the Marketing BPF automatically to the Sales BPF as soon as the Marketing BPF got the status "Finished".
 
I tried to perform that with the following Power Automate Flow. I would like to perform it without JavaScript. It worked that I create a new Sales BPF and connect it with the lead but the Marketing BPF is still the one that is shown in the UI. (See screenshots below.
 
Can someone help me to change the shown BPF in the UI?
 
Thanks in advance.
 
 
 
When a row is added, modified or deleted:
 
CreateLeadToOpportunitySalesProcessBPF:
 
UpdateLead:
 
There is still the Marketing BPF in the UI even if the only active BPF is the Sales BPF:
Active processes:
Archived processes:
I have the same question (0)
  • Suggested answer
    Muhammad Shahzad Shafique Profile Picture
    2,331 Most Valuable Professional on at
    Change BPF (Business Process Flow) to another BPF on update of record
    1: Trigger the Flow When Marketing BPF is Finished
    1. Trigger:
      • Use "When a record is updated" (Lead entity).
      • Set a filter to detect when bpf_<MarketingBPFId>_status changes to "Finished".
    2. Get the Lead’s Current BPF Info:
      • Use "Get record" action (Lead entity) and retrieve:
        • processid (GUID of the active BPF).
        • stageid (current stage).

    2: Deactivate the Marketing BPF
    1. Deactivate the Current BPF:
      • Use "Update a record" (Lead entity).
      • Set:
        • processid = null (this removes the active BPF).

    3: Activate the Sales BPF
    1. Set the New BPF (Sales BPF):
      • Use another "Update a record" (Lead entity).
      • Set:
        • processid = GUID of the Sales BPF (find this in Business Process Flow settings).
        • stageid = First stage GUID of the Sales BPF (get this via "List stages of a BPF" action if needed).
  • MichaelFo96 Profile Picture
    112 on at
    Change BPF (Business Process Flow) to another BPF on update of record
    Hello Muhammad,
     
    I've tried it as you said but it seems that it is not valid to perform a lookup in the trigger. 
     
    Therefore I tried it like that:
     
    When a row is added or modified
     
    Update Lead
    Set Process ID to null
     
     
    Update lead
     
    I receive the following error:
    "error": {
                "code""0x80040216",
                "message""Participating entity record of stage: bfc9108c-8389-406b-9166-2c3298a2e41f is not valid",
                "@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionSourceKey""Plugin/Microsoft.Crm.ObjectModel.GlobalActiveStagePlugin",
                "@Microsoft.PowerApps.CDS.ErrorDetails.ApiStepKey""bb48066e-f22f-412f-a530-91f72e4b859b",
                "@Microsoft.PowerApps.CDS.ErrorDetails.ApiDepthKey""1",
                "@Microsoft.PowerApps.CDS.ErrorDetails.ApiActivityIdKey""4714e32d-daa3-49ed-a794-bbfb485d7c69",
                "@Microsoft.PowerApps.CDS.ErrorDetails.ApiPluginSolutionNameKey""System",
                "@Microsoft.PowerApps.CDS.ErrorDetails.ApiStepSolutionNameKey""System",
                "@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionCategory""SystemFailure",
                "@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionMessageName""UnExpected",
                "@Microsoft.PowerApps.CDS.ErrorDetails.ApiExceptionHttpStatusCode""500",
                "@Microsoft.PowerApps.CDS.HelpLink""http://go.microsoft.com/fwlink/?LinkID=398563&error=Microsoft.Crm.CrmException%3a80040216&client=platform",
                "@Microsoft.PowerApps.CDS.TraceText""\r\n[Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.GlobalActiveStagePlugin]\r\n[bb48066e-f22f-412f-a530-91f72e4b859b: GlobalActiveStagePlugin]\r\n\r\n",
                "@Microsoft.PowerApps.CDS.InnerError.Message""Participating entity record of stage: bfc9108c-8389-406b-9166-2c3298a2e41f is not valid"
            }
     
     
    Do you have any idea why that happened?

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 > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 179

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 128 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans