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

Alok Das
Tera Guru

Hi Swaroop,

Use gs.getUserDisplayName() instead of gs.getUserName() in your business rule and in your notification Hello ${event.parm2}.

gs.getUserName() returns the UserID of the user and gs.getUserDisplayName() returns the User's display name whereas gs.getUserID() returns the sys_id of the logged in user.

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

Regards,

Alok

Hello Alok,

I have done the changes as you mentioned and as well attached the screen shots, still the values are empty.

Please let me know if i am doing any mistake.

 

 

Thanks in Advance.

Hello,
Could your find the right answer ?
Best regards.