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 :
Finance | Project Operations, Human Resources, ...
Suggested answer

How to save row data on changing forms

(1) ShareShare
ReportReport
Posted on by 160
Hello,
I have a problem with saving data on my form. I've got 2 forms related by myId. MyTable, MyTrans with the same tables.
 
When I create a row on MyTable and change the form by clicking on myId field the MyTrans form opens with no data since no data has been saved yet. Ofcourse it works if I hit the save button first, but what if I don't?
I need a way so the user can't change the form without saving it or a way to save it automaticaly on clicked on myId reference field.
 
How can I accomplish it?
Categories:
I have the same question (0)
  • Suggested answer
    Nimsara Jayathilaka. Profile Picture
    809 on at
    How to save row data on changing forms
    Hello RadekM,
     
    To save as much data as possible before users navigate between related forms, you can enable auto save features or write JavaScript to save a form automatically when a user clicks certain fields, such as the myId reference. Dynamics 365/Power Apps has an auto save built in, and saves user changes every 30 seconds automatically, or when navigated away from a field/tab, but does not save a new record automatically if a user navigates away before saving. You can use a script on the myId field OnChange or OnClick event that calls formContext.data.save(). Calling this method will save the current record immediately, which will minimize data loss if a user were to switch forms without explicitly clicking the save button. 

    If you feel answer is helpful , please verify the answer
     
    Thanks
    Nimsara

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 878 User Group Leader

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 681 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 496 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans