How to call global script include from private application scope

anshul_jain25
Kilo Guru

Hi ,

how to call global script include from private scope application.

below is the client script code which is calling script include from global scope, I want to use same code and call same script include but when working in my private scope.

What changes needs to be made in the code

1 ACCEPTED SOLUTION

johnolivermendo
ServiceNow Employee
ServiceNow Employee

Hey Anshul,



You can try simply adding 'global.' when you initialize the global script include in your scoped app. For example it would look like this:



var scriptInclude = new global.scriptInclude();


View solution in original post

7 REPLIES 7

karthiknagaramu
Kilo Sage

Hi,



Try setting the Accessible From field with value All Application Scopes in the script include.



Regards,


Karthik Nagaramu


I am getting this below error any idea on this.


onChange script error: TypeError: Unable to get property 'split' of undefined or null reference function(){var o=i(m,arguments);return l.apply(n,o)}


johnolivermendo
ServiceNow Employee
ServiceNow Employee

Hey Anshul,



You can try simply adding 'global.' when you initialize the global script include in your scoped app. For example it would look like this:



var scriptInclude = new global.scriptInclude();


Hey Anshul,



Did my proposed solution work for you?