How to get User Name from Event Parm1 in Email notification template.

Swaroop10
Giga Contributor

Hello,

In "Approval Rejected by other" email notification, it will trigger email's to remaining approvers apart from the one who rejected saying "This approval was rejected by xxxx Approver". Here the email notification was getting triggered to remaining approvers from "Approval Rejected by other" notification. 

Area of facing issue - 

While triggering notification to remaining approvers, it was not getting their name in Email notification. I want to get their name in Email notification like,

Hello XXXX approver,

This ChgXXX request was rejected by one of the approver XXXX.

Please let me know any possible suggestion to fetch Recipient's name in salutation part : *Hello <XXXX> approver*.

I have tried writing like Hello ${event.parm1}, but it was giving User sys_id and not the User_name. I want the user_name to be populated at that place.

 

Thanks in Advance.

12 REPLIES 12

Swadesh Saraf2
Kilo Guru

There are 2 options you can use:

 

1) Use mail script to gliderecord the user and get info based on event param1

2) You can right away send the actual username to param 1 from where you are triggering the event

And if you are using param1 to send email as well,

3) Use param2 for your user ID.

Hello Swadesh,

Thanks for the quick reply.

Can you help me with the code how to configure that. It will be really helpfull.

 

Thanks in advace.

Can you share the code from where you are triggering the event please?

You will only need to pass a second parameter which will be the user name and use that as "Hello ${event.parm2}"

Hello Swadesh,

Below is the screen shot of code which i am triggering from Email script.

find_real_file.png

I have tried using Hello ${event.parm2} as well in Email template and it was populating as empty. Is there any mistake of my code in Email script which i am using right now?

 

 

Thanks in advance.