web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Stop BPF stage movement.
Power Apps
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?

I have the same question (0)
  • ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    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.

  • Community Power Platform Member Profile Picture
    on at

    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.

  • meelamri Profile Picture
    468 on at

    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/

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard