Rejected RITM - Request

Shiri
Kilo Contributor

I have a service catalog.. wanted to know if I can add something to the Workflow that when the RITM is rejected - the approval field in the Request will change to Rejected?

I have a step in the workflow (X= Set Values) that after the Approval is marked as Rejected sets the values in the RITM of the State to ‘Closed Complete’, the Stage to ‘Request Cancelled’.

The Request State of the Request also changes to ‘Closed Complete’.

Can I have the workflow update the Approval field in the Request – from ‘Approved’ to ‘Rejected’?

 

Thanks!

1 ACCEPTED SOLUTION

Manas Kandekar
Kilo Guru

Hi

Create run script activity in workflow.

close();

function close()
{
var gr = new GlideRecord("sc_request");
if(gr.get(current.request))
{
gr.approval= 'rejected'; //REQ closed complete
gr.update();
}
}

 

If my answer helped you in any way, please then mark it correct and helpful.

Kind regards,
Manas

View solution in original post

4 REPLIES 4

Manas Kandekar
Kilo Guru

Hi

Create run script activity in workflow.

close();

function close()
{
var gr = new GlideRecord("sc_request");
if(gr.get(current.request))
{
gr.approval= 'rejected'; //REQ closed complete
gr.update();
}
}

 

If my answer helped you in any way, please then mark it correct and helpful.

Kind regards,
Manas

Chaitanya Redd5
Tera Guru

Hi Shiri,

I see that OOB rejected choice is available in State field of Request. You can set the Request state value as Rejected by the same set value activity. Kindly follow the below steps to set the request state as rejected.

1. Scroll down the Set Values field drop down in set value activity.

2. Click on the show related field.

3. Click on the Request->Request fields.

4. Click on the State.

5. Now select the value as rejected.

6. Update the set value activity in workflow.

 

Kindly mark my answer as Correct and helpful based on the impact.

Regards,

Chaitanya

Thank you, this changed the state of the request and still showed it as approved. Is there any field there that will change the Approval?

find_real_file.png

Yes! Instead of selecting state in step#4, you can select Approval and set the value as Rejected.