Announcements
Thanks for taking the time to read my question.
Is there a way to get the Dataverse record ID of the record I just saved using SubmitForm()?
A quick search says I can do this if I use Patch()... Do I need to change?
Thanks
If you are using a form you should be able to do something like this on the submit button.
SubmitForm(Form1);UpdateContext({lastID: Form1.LastSubmit.ID})
Hi @iwonder
You can use this syntax:
YourFormName.LastSubmit.ColumnName
So if you have an ID column in your table and the form name is Form1, then you should have:
Form1.LastSubmit.ID
@iwonder
In your OnSuccess action of the form, you can get the ID there. If you were setting this to a variable, then:
UpdateContext({submitID: Self.LastSubmit.ID})
@Pstork1 you will not want to put anything after the SubitForm as there is no guarantee that the SubmitForm has completed, or if it was successful. So putting the UpdateContext after the submitform function can lead to inaccurate results. Having it in the OnSuccess guarantees that it will be accurate.
I hope this is helpful for you.
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 325 Most Valuable Professional
11manish 165
MS.Ragavendar 88 Super User 2026 Season 1