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:04 PM
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());
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2020 02:16 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2020 02:36 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2020 03:31 PM
Hello Swadesh,
I have triggered the notification and the Approver's names are coming as Empty still.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2022 02:39 PM
Super thank you for the mail script option i've never seen that one!