- 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: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:14 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2017 10:16 AM
Can you post the script in Run script catalog task here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2017 10:19 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2017 10:21 AM
As I said you don't need the set assignment group at all
you need use this code in other activity