Client Script that runs on every page

gaz624
Mega Contributor

Hi,

Is is possible to run a client script on every page? A global client script that could be run. Is it also possible to also have a global business rule ..one that does't require you to set a table?

Thanks

10 REPLIES 10

Srinivas Balusu
Kilo Guru

For Business Rules:


find_real_file.png


For Client Scripts:


find_real_file.png


JusCuz
Tera Guru

There is a global option for the table to run it against......I certainly would not want to do this, I mean you are talking about adding overhead to EVERY page load that happens in ServiceNow.


gaz624
Mega Contributor

Just tried a client script and chose Global table. It didn't run on the homepage but only when I open an incident or change.


Chris M3
Tera Guru

A Global Business Rule is like a Script Include.   It's a defined function that gets called from elsewhere, it isn't getting triggered.



Global Client scripts are definitely possible, either as a Client Script if it's something you want to run at a specific time (on Load/submit), or a UI Script if it's something you want available to be called, or to be linked to a certain UI Element