Skip to main content
Community site session details

Community site session details

Session Id : 5I7MRaLL2ijI5UXAjr55Ql
Power Apps - Building Power Apps
Unanswered

Autosave item in command bar before executing javascript

Like (0) ShareShare
ReportReport
Posted on 8 Apr 2022 16:40:30 by 827

Working with a model-driven app.  I have a button I've added to the Main Form command bar for my table that executes some javascript.

 

Before the javascript is executed, though, I want to save the form buffer, so any unsaved changes a user has made to the form will be available to the resulting pages/flows.

 

Microsoft's documentation suggests that this happens by default, if I'm understanding it correctly.

AutoSave

  • Many JavaScript commands start by saving the form buffer. This is because it makes the rest of the code easier to work with.
  • By default, the form buffer is saved on behalf of the app maker.
    • The form is saved before the command is initiated.
    • Any problems that occur during the save operation are dealt with in the form's UI.

 

In my tests, however, this isn't happening.  If I change a form field and click the button before saving, the item is not saved before the javascript fires.

 

Anyone know what I'm doing wrong?

 

Categories:

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete