How to get User Name from Event Parm1 in Email notification template.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2020 01:35 PM
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.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2020 02:44 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2020 03:35 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2021 03:57 AM
Hello,
Could your find the right answer ?
Best regards.