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

Jaspal Singh
Mega Patron
Mega Patron

Hi Bijoy,

 

Can you share what did you start and where are you stuck?

Additionally, give link a check.

Gaurav Shirsat
Mega Sage

Hello @BijoyDeb 

As per My Understanding As soon as RITM is Generated Approvals are Triggered,

Notification should go to Approver Right?

Could You Please tell who will be the Approver? A Group or Requested For Manager or any User?

 

Below Assume Requested For Manager is Approver 

You need to create an Email Notification on sc_req_item Table

When to Send Conditions are 

Record in inserted or Created and Inserted check box must be checked

GauravShirsat_0-1693284304359.png

Add who will receive as 

GauravShirsat_2-1693284545946.png

Add Approver or Reject you can refer @Jaspal Singh  Answer here 

Thanks and Regards

Gaurav Shirsat

 

 

BijoyDeb
Tera Contributor

@Gaurav Shirsat I want to send it to the requested for (variable i have created) only, but as soon as a submit request, ritm is getting approved. I want it to be in waiting for approval and one notification to be sent to requested for