Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

glide.script.block.client.globals - false : still blocks native jQuery

cc11
Tera Contributor

Looking for some help,

I need to use native jQuery scripts on my custom application forms.

I created sys_property glide.script.block.client.globals and set it to false as shown in the screenshot below.

But I still see the error (TypeError: $ is not a function) on loading my client scripts.

find_real_file.png

I work on Geneva instance.

Thank you,

Yogesh

1 ACCEPTED SOLUTION

Shishir Srivast
Mega Sage

Hi Yogesh,



You need to create a property with same scoped application and it will work. I just tried and it worked for me. Please follow the below steps, hope this will help you.



Change your application to Test Scope and then create glide.script.block.client.globals with value false in sys_properties.list table (when you are trying to create system property be in your test scoped application then Name will automatically be suffix with scoped application + property name) please refer the screenshot below.


find_real_file.png


once done then use the below code, with your required field name.


find_real_file.png


and it will work, see the result below please.



Before:


find_real_file.png


After:


find_real_file.png


View solution in original post

10 REPLIES 10

Shishir Srivast
Mega Sage

Hi Yogesh,



You need to create a property with same scoped application and it will work. I just tried and it worked for me. Please follow the below steps, hope this will help you.



Change your application to Test Scope and then create glide.script.block.client.globals with value false in sys_properties.list table (when you are trying to create system property be in your test scoped application then Name will automatically be suffix with scoped application + property name) please refer the screenshot below.


find_real_file.png


once done then use the below code, with your required field name.


find_real_file.png


and it will work, see the result below please.



Before:


find_real_file.png


After:


find_real_file.png


Hi Shishir ,

 

This is working only for old records. when I am creating new record and selecting value in reference field ,the icon-info is still appearing.

Please help me on this ..

Thanks in advance

madhuri

Hi shishar,

Above mentioned procedure is working while iam creating new records, It is only working for old records.

Please help me with this..

While creating a new record it is not displaying information icon beside the reference field but after selecting any value reference value, information icon is appearing.

find_real_file.png

 

 

find_real_file.png

 

thanks in advance,

madhuri

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Yogesh,



In the standard forms UI (eg client scripts, client ui actions) - by default, we block access to the DOM and certain top-level globals (window, document, $ / jquery). You can enable an application-specific property to gain access to the DOM.


You can enable an application-specific property to gain access to the DOM. This provides a good tradeoff by setting a default with best practice guard rails, and allowing a developer to take explicit action to opt out of the best practice.



To opt out of the best practice create the following property in your scope and set it to false. glide.script.block.client.globals