What will happen if I make a client script 'global'?

Vivek Verma
Mega Sage
Mega Sage

Thank You!

1 ACCEPTED SOLUTION

DirkRedeker
Mega Sage

Hi

Marking a Client Script as "Global" will make is available to ALL Cient Scripts.

NOTE:
There is a technical drawback on doing so. Because it is available for all Client Scripts, it will be INCLUDED and transferred to EACH single Client Page shown in your Web-Browser, which also blows up your volume of data, that needs to be transferred for each opened page.

That will slow up your overall performance for end-users.

So, keep an eye on WHAT you put as "global". Use that VERY rare and only place code there, which is REALLY needed EVERYWHERE!!!

Let me know if that answers your question and mark my answer as correct and helpful.

BR

Dirk

View solution in original post

8 REPLIES 8

Dubz
Mega Sage

If you make a client script global it will be only able to operate on an application in the global scope. If you're working in a scoped app you will need to set it the application of your client script to the name of your scoped application.

 

Global Scope

Aishwarya Theva
Tera Guru

Hello,

It is an Indicator of whether the script applies to all views. When Global is selected, the script runs regardless of what view is being displayed. When Global is not selected, this script runs only if the current view matches the script's view.

Hope this helps!

 

Best Regards,

Aishwarya Thevar

 

 

It refers to application scope, not UI view.

@David Dubuis , I believe he's referring to the 'Global' checkbox on the script form, not the Application field. In which case it does in fact refer to the View. Hence, if you unselect the Global checkbox, you're given a 'View' field to specify the view.