I have a Generic Request Item workflow that I want to use for most of my Catalog Items when ordered: At the moment my RITMS and CSTASKS are assigned the same Fullfiler Group as I have set as 'Approver' Group for the REQ. How do I set the RITM and S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2018 12:28 PM
Hi Cummunity,
I have a Generic Request Item workflow that I want to use for most of my Catalog Items when ordered:
At the moment my RITMS and CSTASKS are assigned the same Fullfiler Group as I have set as 'Approver' Group for the REQ
How do I set the RITM and SCTASK Fullfiller Group to pick up the Fulfillment Group value stored in the 'Fulfillment group' attribute in the Catalog task?
I guess this can be done in the Catalogue Task but not sure how? Greatful for assistance:)
Thank You
Sadfa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2018 02:30 AM
Hi Sandesh & Ashutosh,
Thank you for your solutions:)
I have added the 'run script activity in the workflow running on the RITM table' and that is working great as it is making sure the RITM now is populated with the 'Fullfiller' group stated in the Catalog Item (Thank You)
I did not fully understand instructions around 'write a before BR on sc_task table
current.assignment_group = current.request_item.assignment_group;' so I tested the second solution:
2: Write below code in catalog task:
var gr = new GlideRecord('sc_cat_item');
gr.addQuery('sys_id',current.request_item.cat_item);
gr.query();
if(gr.next())
{
task.assignment_group = gr.fulfillment_group; //Field Name of Fulfillment group
}
but this gives me the error in the attached image.
Grateful for guidance as in what I am doing wrong:)
Thanks,
Sadfa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2018 02:37 AM
write a before business rule on sc_task table.
check 'insert' field on the business rule
add the following lines :
populateTaskGroup();
function populateTaskGroup() {
current.assignment_group = current.request_item.assignment_group;
}
This will populate you assignment group value with your request item assignment group value
Please mark helpful/correct based on the impact of response.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2018 02:40 AM
Also since you have catalog task being created via workflow, you dont have to write a BR. in the catalog task activity just sellect advance option
and write the following line:
task.assignment_group = current.assignment_group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2018 03:18 AM
Hi Sandesh,
Perfect!! It works:)
Thanks You !!
Sadfa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2018 03:25 AM
Glad it helped. Can you please mark your question as correct!