
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2018 03:58 AM
Hello Experts,
I need to copy the previous data of "total_Cost" field to "Previous_total_cost" field.
"total_cost" field type is of string type
Requirement is : Need to trigger an email if any changes happened to the "total_cost" field and in the body previous total cost should be there so i have created a field "previous_total_cost". but couldn't get the previous value of "total_Cost" field to "Previous_total_cost" field.
"Previous_total_cost" field will be not visible in the form.
So please suggest me how can i achieve this, any help would be appreciated.
Regards,
Chalan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2018 04:15 AM
Hi,
Please follow below points to make it work.
1) Create a before update BR which copies the value of total cost to previous total cost in case when total cost changes.
current.u_previous_total_cost = previous.total_cost.
2) Once you BR is ready, get the current values of your fields in the notification and it should do.( If you don't have a notification in place already, then you can create on record updated/through eventqueue.
Thanks
Gaurav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2018 04:18 AM
User below condition in Before update business rule
if(current.total_Cost.changes() && !current.total_Cost.nil() )
current.Previous_total_cost = previous.total_Cost;