How to send approval mail to requested for for RITM?

BijoyDeb
Tera Contributor

Hi,

  I have a requirement that if RITM is generated, then an approval mail should be sent to requested for.

That mail should contain 2 links to approve and reject RITM.

  I was not sure how to do this, please help me with the approach

Thanks!!

1 ACCEPTED SOLUTION

Hello @BijoyDeb 

If You have Applied Workflow to your Catalog Item After begin do one thing add Run Script Activity and use below code

var Req = current.request.getRefRecord();

Req.requested_for=current.variables.<>//add your variable backend name of Requested for

Req.state=1//select as per values in your client sys_choice table for sc_req_item table

Req.update();

current.state=1;

current.requested_for=current.variables.<>//add your variable backend name of Requested for

current.stage.

req.approval="requested"; //choose which one you want

 

or instead of this you can use Set Value Activity also.

 

after this use approval user activity in workflow and add Requested for

GauravShirsat_0-1693286102116.png

then send notification as I have directed just use requested for there also

View solution in original post

9 REPLIES 9

Hi,

You can create notification giving who will receive as requested for 

And can you give some info on flow or workflow configured for this ?

 

Thanks,

Ramya Addala 

 

Hello @BijoyDeb 

If You have Applied Workflow to your Catalog Item After begin do one thing add Run Script Activity and use below code

var Req = current.request.getRefRecord();

Req.requested_for=current.variables.<>//add your variable backend name of Requested for

Req.state=1//select as per values in your client sys_choice table for sc_req_item table

Req.update();

current.state=1;

current.requested_for=current.variables.<>//add your variable backend name of Requested for

current.stage.

req.approval="requested"; //choose which one you want

 

or instead of this you can use Set Value Activity also.

 

after this use approval user activity in workflow and add Requested for

GauravShirsat_0-1693286102116.png

then send notification as I have directed just use requested for there also

Ankur Bawiskar
Tera Patron
Tera Patron

@BijoyDeb 

are you using flow or workflow?

you can use advanced logic in workflow and send it to the variable

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar I was using flow

1st used update record action to update ritm record to waiting for approval

But in ask for approval action, there is no way to add appover

@BijoyDeb 

you can use scripted approval where you can set the approval user dynamically

Scripted Approvals in Flow Designer with Flow Variables

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader