How to populate request and requested item state same when changing Catalog task state?

sruthig
Tera Expert

How to populate request and requested item state same when changing Catalog task state?

I want to make Request state to Closed complete when SC Task state changes to closed complete. I want to do the same for all the state like Pending, Work in progress, Closed Complete, Closed Incomplete, Closed Skipped.

Please do the needful!

Regards,

Sruthi

5 REPLIES 5

Ankush Jangle1
Kilo Guru

Hello,

 

Explore these three OOB business rules for request/RITM/Task closures :

Close Parent if Required --> written on RITM table

Mark Request Closed --> written on sc_request

Close Ticket --> written on sc_task

Please mark the answer as helpful/solution is that answers to your query.

AMIT SHISHODIA2
Giga Guru

Hi Sruthig,Use this runscript in your workflow 
var gr = new GlideRecord('sc_task');
gr.addQuery('request_item',current.sys_id);
gr.query();
if(gr.next()){
if (gr.state != '') {
current.state = gr.state;
}
}

Please make a GlideRecord for sc_request table also to make it work for sc_request table also

It will update your sc_req_item's state same as catalog task

Please Mark it correct and helpful if it solves your query

Hi Amit,

 

Thanks for the reply.

I have tried the above run script in my workflow but not working.

 

Regards,

Sruthi

Omkar Mone
Mega Sage

Hello,

 

When you create a Catalog task activity from workflow, there is a checkbox named Wait for completion, check that. Add one more activitya after the previous catalog task activity in which the stage of fulfillment is to be set as completed.

 

Let me know if that helped.

 

Regards

Omkar Mone