Why do "Onsubmit client scripts" run when viewing the record's history?

HugoFirst
Kilo Sage

We have "Onsubmit" client scripts that check for specific conditions in a form and pop-up a modal if any of the conditions are found.  Since our upgrade to San Diego, we found that these scripts run and pop-up modals when the user views the record's history.   This is most annoying to the user.  Especially since no update of the record takes place.  Any ideas on how to handle this?

5 REPLIES 5

Mike_R
Kilo Patron
Kilo Patron

It's controlled by this UI Macro "history_context", but I wouldn't suggest modifying the code.

instanceName.service-now.com/nav_to.do?uri=sys_ui_macro.do?sys_id=281f8a8dc0a8016728a57b48cdea74bd

 

Since it's directly related to an upgrade, i would suggest opening a ticket with ServiceNow.

HugoFirst
Kilo Sage

Thanks for the update Mike_R.  I checked the UI Macro and I see that it calls server side code with gsftsubmit.  I suppose this is what causes the Onsubmit client scripts to fire?

 

In any case, I have opened a ticket with ServiceNow and am waiting for a response.

Yep exactly. I think it's that gsftsubmit line too. We'll see what support says

Shaik Zuber
Tera Contributor

Hi

 

Have you found any solution or root of the issue.

Thanks,

Zuber