Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Close form and Ignore "Your changes have not been saved." Pop Up Dialog

(0) ShareShare
ReportReport
Posted on by 150

When I use formContext.ui.close(); to close a form that has dirty/edited fields on it I get the standard browser dialog "Your changes have not been saved." I want to ignore or suppress this dialog and not save the changes on the form and close the form window. The reason I am trying to do this is that I am launching an external website from this form and I don't need the form edits to be saved after the external website is launched.

I am running Dynamics v9 on-premise and we are not using the Unified Interface.

pastedimage1637108596463v1.png

  • Suggested answer
    meelamri Profile Picture
    meelamri 13,212 User Group Leader on at
    RE: Close form and Ignore "Your changes have not been saved." Pop Up Dialog

    Hi,

    I believe you can use the method executionContext.getEventArgs().preventDefault(); this will cancel the save.

    Please refer to this Example: docs.microsoft.com/.../getsavemode

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 1 Super Users!

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

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,307 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans