workflow catalog task script

suresh51
Tera Contributor

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.

 

1 ACCEPTED SOLUTION

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;
}

View solution in original post

7 REPLIES 7

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.

table name: Application[cmdb_ci_appl]

variable name: application

 

Thank you jaspal singh

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;
}