- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2021 06:46 AM
In a non-scoped app you would simply call
incnum = new NumberManager("incident");
to get the next incident number in a sequence.
How is that done in a scoped app.
I tried these permutations:
incnum = new global.NumberManager('incident');
incnum = global.NumberManager(ninc.sys_meta.name).getNextObjNumberPadded();
all get errors similiar to:
llegal access to package_private script include NumberManager: caller not in scope rhino.global
The incident table has "Accessible from" set to "All Applications scopes".
Solved! Go to Solution.
- Labels:
-
Scoped App Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2021 07:23 AM
Hi
have a look on Script Include "NumberManager":
OOTB only access from global scope (and NOT from scoped application!) is allowed.
You have 2 ways for solving that issue:
- You change "Accessible from" to "All application scopes". This would create a skipped record the next upgrade you have to take care about.
- You implement a "proxy script include" in global scope, which calls NumberManager and is invoked by your scoped application. The disadvantage is, that this extra script include is not part of your scoped application and has to be deployed separately.
Kind regards
Maik
If my answer replied your question please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2021 07:23 AM
Hi
have a look on Script Include "NumberManager":
OOTB only access from global scope (and NOT from scoped application!) is allowed.
You have 2 ways for solving that issue:
- You change "Accessible from" to "All application scopes". This would create a skipped record the next upgrade you have to take care about.
- You implement a "proxy script include" in global scope, which calls NumberManager and is invoked by your scoped application. The disadvantage is, that this extra script include is not part of your scoped application and has to be deployed separately.
Kind regards
Maik
If my answer replied your question please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2022 08:36 AM
Stumbled across this post... for completeness, if you do this from a scoped app you can't use the "sys_meta.name" in the call to the script include you typically would. To get this work you just need to put the string of that table name instead...ie:
incnum = global.NumberManager('incident').getNextObjNumberPadded();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2021 05:50 AM
Thanks for your reply. It seems service now did not intend for scoped apps to work with the OOTB tables completely.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2021 05:58 AM
Hi
it depends on why you want to call NumberManager directly. Normally it is not needed as you configure your number settings at "Number Maintenance".
Kind regards
Maik