HRSD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 05:36 AM
This HR case has been assigned back to the group as the previous 'Assigned to' user ${assigned_to} is now inactive or no longer a member of ${assignment_group} group.
I have written the above line in the notification body. It is populating the assignment group name but not the previous assigned to. I need to populate the previous assigned to as well.
Can anyone please help me out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 08:21 AM
Hi @abhisek ,
The 'previous' keyword is not available within email notifications. You're probably used to seeing this handle in business rules along with 'current'.
How are you triggering the email? Is it conditionally based (using the config builder) or are you triggering via an event.
If via an event, you can pass the previous value in as a parameter - see the below example:
gs.eventQueue("event_name", current, previous.assigned_to.getDisplayValue(), parm2);
This can then be called from the notification script as follows:
<mail_script>
template.print("Previous Assigned To: "+ current.parm1);
</mail_script>
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2024 01:31 AM
Hi @Robbie
Thanks for your reply. I am triggering the notification through event and script include.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2024 01:52 AM
Hi @abhisek ,
Thanks for confirming. As mented in my initial response, when you trigger the event pass the previous assign_to value as a parameter in the gs.eventQueue() method as show below:
gs.eventQueue("your_event_name", current, previous.assigned_to.getDisplayValue(), parameter_2_or_poass_empty_string);
This can then be called from the notification script as follows:
<mail_script>
template.print("Previous Assigned To: "+ current.parm1);
</mail_script>
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2024 02:12 AM