Previous Value in Mail Script

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2013 05:36 AM
Hello,
Is it possible to output a previous field value in a mail script? Something like this:
<mail_script>
var pdd = previous.due_date.getDisplayValue();
template.print('previous due ' + pdd);
</mail_script>
Thanks!
Mark Didrikson
- Labels:
-
Analytics and Reports
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2015 07:05 AM
Hi Greg,
It is fantastic. But it is giving only the recent values which are updated. Is there any possibility to get the previous values from which the new values got changed.
I have a requirement similar to this but I need to display in mail script both current value and previous value when I tried to replace the current object with previous it is not working.
Thanks,
Vamsi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2013 05:15 AM
Thanks for the response. I was able to create an Event and then pass in the previous.due_date value that way.
Here is what I ended up doing:
Business Rule:
gs.eventQueue("sc_task.due.date.changes", current, gs.getUserID(), previous.due_date);
Email Notification:
<mail_script>
template.print(event.parm2);
</mail_script>
Thanks!
Mark Didrikson