- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2022 10:12 AM
hi guys,
i need script for workflow catalog task when selects any application in i need to automatically assign to application support group
pls help me guys.
Thanks in advance.
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2022 01:46 PM
Thanks. Try below in the Catalog Task workflow activity.
var selectedapplication= current.variables.application;
var getgrp=new GlideRecord('cmdb_ci_appl');
var getname=getgrp.addQuery('sys_id',selectedapplication);
getname.addOrCondition('name',selectedapplication);
getgrp.query();
if(getgrp.next())
{
task.assignment_group=getgrp.support_group;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2022 10:55 AM
Is the Application variable referencing to some table? If so, can you confirm the table name?
Also, what is the dictionary name for Application variable that you have created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2022 11:03 AM
table name: Application[cmdb_ci_appl]
variable name: application
Thank you jaspal singh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2022 01:46 PM
Thanks. Try below in the Catalog Task workflow activity.
var selectedapplication= current.variables.application;
var getgrp=new GlideRecord('cmdb_ci_appl');
var getname=getgrp.addQuery('sys_id',selectedapplication);
getname.addOrCondition('name',selectedapplication);
getgrp.query();
if(getgrp.next())
{
task.assignment_group=getgrp.support_group;
}