cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jronash
Impactful Individual
Impactful Individual

Autosave item in command bar before executing javascript

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?

 

0 REPLIES 0

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (1,430)