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

I am looking for the code where you are calling the event from. Something like this

gs.eventQueue('incident.commented', current, gs.getUserID(), gs.getUserName());

Hello Swadesh,

I am calling it from a Business rule called "Approval Events(task)"

And i have written an Email script like

And i am calling the scripts in Notification like below

 

Please let me know where i am doing a mistake.

 

 

Thanks in Adavance.

This should be working, the parm2 contains the user name of current logged in user, Can you please trigger this once and check the event logs and see what it has there?

Hello Swadesh,

I have triggered the notification and the Approver's names are coming as Empty still.

 

Thanks in advance.

Super thank you for the mail script option i've never seen that one!