Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Unanswered

Stop BPF stage movement.

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I have a requirement,  If the record in my model driven app is assigned to Person-A and Person-A is staying on the page and doing research, Person-B re-assigns this record to himself. Without refreshing the screen, Person-A would not know the owner has changed. If Person-A tries to move to the Next Stage in BPF then a popup should appear to inform Person-A that the record owner is now Person-B. 

 

The issue I'm facing here is I'm able to show the popup but still the stage is moving forward when the owner is changed, which is wrong. So, I need to stop the BPF moving to next stage.

 

I've tried using preventDefault() function but no luck.

 

Can anyone help me with this please?

  • meelamri Profile Picture
    468 on at
    Re: Stop BPF stage movement.

    Hi, 

    Please enable the async onSave feature and try to prevent the save if the owner is changed. 
    Please refer to my blog, it maight help you: https://xrmtricks.com/2022/01/09/optimistic-concurrency-in-model-driven-apps-forms/

     

    Good Luck ! 

     

    Please tick Accept as solution if the answer is useful.

    https://xrmtricks.com/

     

  • Community Power Platform Member Profile Picture
    on at
    Re: Stop BPF stage movement.

    Yes I've added the preventDefault() in success part of Xrm.WebApi.retrieveRecord inside function preStageChange(). I know that Xrm.WebApi.retrieveRecord is asynchronous so I've used 'await' but still the form is getting saved.

  • ChrisPiasecki Profile Picture
    6,389 Most Valuable Professional on at
    Re: Stop BPF stage movement.

    Hi @Anonymous,

     

    You mentioned that you tried the preventDefault function. Did you make this call within a function that is registered for the onPreProcessStatusChange event? If so, can you add a Console.log statement in the same function to make sure that your code is actually executing?

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
stampcoin Profile Picture

stampcoin 17

#2
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 9 Super User 2025 Season 1

Overall leaderboard

Featured topics