- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2017 08:19 AM
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,
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?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2017 10:02 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2017 10:37 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2017 10:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2017 10:51 AM
It working. Thanks!