Invalid 'Choice' record even though the selected outside Table 'Case' is allowed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2021 07:12 AM
Hi All,
I'm getting below error when i am trying to insert choice value through the business rule. The BR is in Global scope.
Error: Invalid 'Choice' record even though the selected outside Table 'Case' is allowed
Script:
var gr2 = new GlideRecord('sys_choice');
gr2.initialize();
gr2.name = 'sn_customerservice_case';
gr2.language = 'en';
gr2.element = 'resolution_code';
gr2.label = 'Value1';
gr2.value = 'value1';
gr2.insert();
-------------------------------------------------------------------------------------
how to resolve this, suggestions please....
Thank You.
- Labels:
-
Scripting and Coding
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2021 12:17 AM
Hi,
can you please check any cross scope access issue?
also check if any record got created in restricted caller access table for this
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2023 12:05 AM
This is working as designed.
You are not supposed to be able to modify a choice list in the Case scope from outside that scope (ie Global). Application scoping exists for the purpose of protecting it's application files from other applications.
This is a very unusual example. Can't understand why you would ever need to do this anyway.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022