- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-30-2017 06:16 AM
Hi All,
I need to get the assignment group of a catalog task on the description. The below scripts is working except for printing the Display value of the Grouip
grpp=[];
for(i=0;i<grpp.length;i++)
{
var gr= new GlideRecord('sc_task');
gr.request_item=current.sys_id;
gr.short_description='bingo fullillment group is : ' +grpp[i].getDisplayValue(); // Using grpp[i].getDisplayValue(); returns undefined
gr.description='bingo - description of this RITM';
gr.assignment_group=grpp[i];
gr.insert();
}
Catalog tasks are getting created as intended
Thanks in advance
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-30-2017 11:52 AM
okay, seems WF is not using ArrayUtil();
try this...
function retGrpName(val){
var gr = new GlideRecord('sys_user_group');
gr.addQuery('sys_id',val);
gr.query();
while (gr.next()) {
return gr.name;
}
},
gr.request_item=current.sys_id;
current.variables.dummy = grpp[i];
gr.short_description='bingo fullillment group is : ' + retGrpName(grpp[i]);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2019 08:45 AM
I tried that with this code (it's a script being executed by a document template that is being called by a UI action)
license = commerce_licenses.u_aero_travel_dept_commerce_license_country[i];
license_display = license.getDisplayValue();
If I print license, I see the sys_id. If I print license_display, I get undefined.
Any ideas?
Thanks,
Shannon