Invalid 'Choice' record even though the selected outside Table 'Case' is allowed?

Ganesh291
Tera Contributor

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.

ErrorInvalid '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.

 

6 REPLIES 6

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

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

The SN Nerd
Giga Sage
Giga Sage

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