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

sadfa
Kilo Contributor

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

Fullfiler.jpg

10 REPLIES 10

sadfa
Kilo Contributor

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.




error.jpg



Grateful for guidance as in what I am doing wrong:)





Thanks,


Sadfa


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


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


Hi Sandesh,



Perfect!! It works:)



Thanks You !!



Sadfa


Glad it helped. Can you please mark your question as correct!