- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 10:06 PM
Hi Guys,
I am using the below referenced qualifier from a scoped app (x_univ6_as_00002) form which is extended from task.
javascript: 'sys_idIN' + (new SNCBusinessServiceUtils()).getServicesForCompany(current.company, 'u_high_level_business_service', '', '', 'advancement');
And this isn't giving me the results I am after, probably because SNCBusinessServiceUtils() is a global script include. And when I changed this to:
javascript: 'sys_idIN' + (new global.SNCBusinessServiceUtils()).getServicesForCompany(current.company, 'u_high_level_business_service', '', '', 'advancement');
It is not working either and am getting the following error:
Illegal access to private script include SNCBusinessServiceUtils in scope rhino.global being called from scope x_univ6_as_00002
Any idea why?
Mussie
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 10:10 PM
Hello Mussie,
Can you navigate to the script include "SNCBusinessServiceUtils" and make sure that the accessible from is set to all application scope.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 10:10 PM
Hello Mussie,
Can you navigate to the script include "SNCBusinessServiceUtils" and make sure that the accessible from is set to all application scope.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 10:15 PM
What you are seeing is expected behavior - globally scoped scripts with 'Accessible' from this scope only' cannot be called from Scoped Applications.
You need to write your own functionality to mimic that script.
- If you plan on publishing your app, you won't be able to include the scope access change to that script.
- Changes to globally scoped items will not be included in your Update Set.
- It will not be certified.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2017 02:29 PM
That did the trick Pradeep, thank you for your help. Also thanks Paul for the details.