Global system script includes not available from scopes

john_roberts
Mega Guru

There are many system provided script includes that are not accessible from custom scopes. Even though they are in the global scope they are blocked because the "accessible from" value is set to "this scope only". This is going to create a huge issue and drive everyone to make a lot of changes to system scripts.

First ones I came across were commonly used, JSUtil and TableUtils.

Changing the "accessible from" resolves the issue. Platform wide system scripts should be set to be available in all scopes or just not have the setting apply if scope is global.

"Illegal access to private script include TableUtils in scope rhino.global being called from scope x_...."

David Gatley

24 REPLIES 24

So looking at my script include for XMLHelper it is available for all applications. I have not changed the script include. I think that is why we are getting varying results. So hopefully in the next patch that is changed to All Application Scopes. It is a very useful tool.


Darn. Oh well, I'll still buy you a beer if you're heading to Knowledge.


Travis,



I have a fresh build with Patch 8 and it looks like XMLHelper is still set to "This scope only."   Inquiring internally about this.



Chris


So I got confirmation, if you need the toObject() functionality of XMLHelper, you can use gs.xmlToJson() (which actually returns a Javascript Object, not JSON).



Otherwise you can use XMLDocument2.



Thanks,


Chris


tlsimmons
Tera Contributor

I seem to be having the same issue with GlideAjax on Helsinki.



I have a custom application with scoped opened so its available to all applications.


I have my script include setup as client callable.


I am using "Object.extendsObject(global.AbstractAjaxProcessor" in my script include


Then in my UI action I have tried:



gs.include("GlideAjax");


var ga = new GlideAjax('scriptIncludeName');



I've tried


gs.include(GlideAjax);


var ga = new global.GlideAjax('scriptIncludeName');



and I've tried


gs.include(GlideAjax);


var ga = new sn_ws.GlideAjax('scriptIncludeName');



All of them give me:  


"GlideAjax" is not defined