The CreatorCon Call for Content is officially open! Get started here.

Fulfillment workflow script to assign fulfillment group based on requester select application

bbf3562
Kilo Guru

I want to make a script in fulfillment workflow that will assign specific fulfillment group depend on which business application the requester input(reference field). I have business application table(u_business_applications) where it has fulfillment group field called u_fulfillment_group. Here is screenshot of workflow,

find_real_file.png

In "Set Assignment Group", is this the correct code to get fulfillment group value from business application table based on requester choose business application name in reference field(business_application) and then assign it?

find_real_file.png

1 ACCEPTED SOLUTION

If that's the scenario then use the below script directly in create task run script



var gr = new GlideRecord('u_business_application');
gr.addQuery('sys_id', current.variables.business_application);
gr.addQuery('enabled', true);
gr.query();


while(gr.next())
{


task_glide_record.assignment_group = gr.u_fulfillment_group;


}



you need to update "task_glide_record" in the above script


View solution in original post

12 REPLIES 12

I am sorry I don't understand what you mean I don't need the set assignment group at all? The assignment group left as blank in catalog item. It require to assign fulfillment group in assignment group in catalog task.


Uhh sorry I was not clear earlier.. I mean the activity in the workflow..


find_real_file.png



remove the code from that activity and use the code in "Create a catalog task"


It working. Thanks!