- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2020 08:15 AM
Hi,
I have a onSubmit client script on a record producer where I throw an alert box. When the user clicks on "Ok" on the alert box- a dirty form error alert box pops up with the text "Leave Site? Changes you made may not be saved." How to override this 2nd alert pop up?
I tried using g_form.modified = false as I saw in few other threads. But that did not work. Any solution to this?
Thank you,
Shruthi
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2020 02:24 AM
Hi Ankur,
Thank you for your reply. But a property change would be a global change right?
We were able to achieve override it with a combination of onSubmit client script and portal_redirect on RP form.
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2020 08:31 AM
Hi Shruthi,
that message is out of the box coming from browser and I think it cannot be changed
try this property
glide.ui.dirty_form_supportEnables (true) or disables (false) display of a confirmation message when a form has unsaved changes and the user leaves the form through any means except a submit (such as using the green back arrow, any form button, or other). This property is not supported in Safari.
- Type: true | false
- Default value: true
- Location: System Property [sys_properties] table
https://www.servicenowguru.com/scripting/client-scripts-scripting/custom-dirty-form-message/
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2020 02:24 AM
Hi Ankur,
Thank you for your reply. But a property change would be a global change right?
We were able to achieve override it with a combination of onSubmit client script and portal_redirect on RP form.
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2020 03:41 AM
Hi Shruthi,
Just for ref sharing link
please share your solution as well.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader