Element Descriptor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2013 05:42 AM
Element Descriptor is not documented for calgary. Is there any latest documentation available? Prior to calgary I have used below code to get the choice table name from the field element.
var gr = new GlideRecord('cmdb_ci');
gr.get('254570386f7fcd0095d5f941be3ee48a');
var field = gr.getElement('os');
var ed = field.getED();
var choices = field.getChoices();
var choiceTable;
if (JSUtil.notNil(choices) && choices.size() > 0)
{
choiceTable = ed.getChoiceTable();
}
but some how this code is not working in calgary. Is there anything missing in the code? In calgary I am getting below error for above code.
Illegal access to method getChoiceTable() in class com.glide.db.ElementDescriptor
Please suggest.
- Labels:
-
Orchestration (ITOM)
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2013 10:29 PM
var field = gr.getElement('os');
var choices = field.getChoices();
I had to write my own substitute function because it was at times only returning one or zero results, when it should have been returning multiple.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022