We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

'Leave this Page'Prompt while closing browser tab without modifications in Record Producer

Swathi P
Kilo Sage

Hello Team,

 

I have a record Producer and when i am not making any changes on the form and navigating back to the portal home page this prompt comes i dont want this prompt

so i have checked the below as per the below  article https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0788376

Onload client scripts - made the set Value one comment

Catalog ui policy  - no ui policy with clear value or no catalog ui polcy actions 

Widgets  for custom variables 

removed default values as well but still getting the message

Please suggest

4 REPLIES 4

NiharikaU
ServiceNow Employee

Run g_form.getChanges() in the console first — this gives you the exact field name. Then trace that field back to whichever script, default value, or widget is touching it on load. The most common missed culprit is a variable set-level default.

Please like and mark this response if helpful for future reference  .  

Swathi P
Kilo Sage

I dont find this syntax any where in developer document or product doc

and i have disabled variable set level ui policies as well still no luck

Ankur Bawiskar
Tera Patron

@Swathi P 

definitely some variable is getting auto populated and hence when you are moving to other tab or moving back to home page, that error is shown.

Disable all client scripts, UI policies and then see

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Swathi P
Kilo Sage

Hi Ankur,

 

I have disabled even the client scripts and ui policies and checked its the same. Default values of variables which have default values as well still no luck
Is it coz of custom widgets and client scripts on variable sets