How to disable "Leave Site?" pop up when leaving form

matsui
Tera Contributor

I want to disable "Leave Site?" pop up when leaving form.

 

https://docs.servicenow.com/bundle/washingtondc-platform-user-interface/page/use/using-forms/task/t_...
----
Cancel changes to a form

Cancel changes to a form by navigating away from the form without saving.

Before you begin

Role required: none

Procedure

Navigate away from the form view without saving the record.
If a message appears, click Leave this Page to confirm cancellation.
Note: Administrators can disable the confirmation message by setting the glide.ui.dirty_form_support property to false.
----

I understand that I can disable it with glide.ui.dirty_form_support is false in system property, but I do not want to disable in property.
How can I disable specific tables only ?

 

Regards,

4 REPLIES 4

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

What makes that this message appears? Did a user change any information on the form? Than its a valid confirmation right, why disabling it?

 

Did someone put client side onload/onchange logic in place that this message appears? Than its modification, so a valid confirmation right, why disabling it? If you don't want this... don't go searching for disabling: search for the rootcause of what client side scripting is making these changed and fix it.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

matsui
Tera Contributor

@Mark Roethof 
I added an Ui action to the form, which return to the table's list screen.
"Leave Site?" pop up will output, when users inputs value to some fields and click the Ui action.
This is not in line with our requirements.
So, I want to know way to disable specific tables only.

Like I mentioned, fix the rootcause instead of ignoring it and trying to find away around it.

 

What is the cause changes where made to the form? Is that perhaps some scripting onload/onchange which needs to be fixed? Or is it because of user changes, so the message is valid.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Well In my case I added a script based onChange UI policy which is prompting this and I want to disable it to save all my user's one additional click.