How to insert sys_choice for scoped application element?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2017 06:16 AM
Hi,
Can someone please suggest how to populate sys_choice for scoped application element.I have written following code:
var setRecord = new GlideRecord("sys_choice");
setRecord.initialize();
setRecord.element = "x_12345_catalyst_bot_name";
setRecord.inactive = "false";
setRecord.label = reqBody.botName;
setRecord.language = "en";
setRecord.name = "incident";
setRecord.value = reqBody.botName;
setRecord.insert();
But data is not listed under choice.It is working in my local env but when I have installed the application on another instance it is not working.I think it is an application access related issue.But I am not getting any idea how to fix it.
Thanks,
Vimal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2018 04:08 AM
Hi Fogg,
Thank you for providing us this information.
We are trying to import data into 'sys_choice' table via data source and transform map defined in a scoped application.
Since creation is been restricted to 'Global' application, we couldn't import the required choices.
Could you please let us know, if there is any reason why we shouldn't enable 'Can Create' option from other Application Scopes for the Choice table ?
Thanks in advance,
Surendar M

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2018 02:00 AM
That's a good question for our Product Management team, someone made up his mind on why we think this is not a good idea - or not required at least.
Sometimes I struggle with out baseline setup as well 🙂
If you want to change this, the change will need to be in global scope, which makes it again necessary to have a second update set.
The best-practice would be to create a script in global scope which can create the necessary elements. Your private scope can than call this jump script to create the values. This would work without modifying the baseline config.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2024 06:31 AM
I have to constantly move sys_choice*.xml from "author_elective_update" folder to "update" folder so that the choices are included as part of the certified application installation. Otherwise, it seems "author_elective_update" is only installed if the user chooses "install demo data".