- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2016 05:58 AM
I have a field on the incident table . the type is string , When the value of a the field changes or a value is added , work notes should populate the change on Incident table.
I have created a business rule for that on insert and update. but i think there is a problem that it does not work:
this is the condition:
current.work_notes = u_change_tracking;
Any help would be appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2016 06:08 AM
Ok so may be you can write a script like this:
current.work_notes = 'The value of Change tracking # field changed from ' + previous.u_change_tracking + ' to ' + current.u_change_tracking ;
current.update();
Let me know if this helps.
Thanks and Regards,
Aswin Siddalingam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2016 06:09 AM
Hi Soni
Try to log something in your script and see whether it is executing or not so that you can confirm that it is passing the WHEN condition or not
try to create onChange client script and see if it works
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2016 06:14 AM
Creating a client script for this might back fire when the value of Change Tracking # changes and when the analyst at the same time wants to enter work notes also.
Thanks and Regards,
Aswin Siddalingam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2021 05:10 AM
Thanks, This helped me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2016 06:12 AM
I think you just need a 'current.' in front of u_change_tracking.
So
current.work_notes = current.u_change_tracking;
Adding an edit:
It is likely that at some a point a user will make a change to the # and have written their own work notes, in which case on update their notes will be lost and replaced thie the current #. It would be better to write
var wNotes= current.work_notes;
wNotes = wNotes + '\nNew change tracking #: ' + current.u_change_tracking;
current.work_notes = wNotes;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2016 06:18 AM
this current.work_notes = u_change_tracking; is wrong... you cant use u_change_tracking directly.
Also you can write onchange client script on that change_tracking field.
--
Mark Correct if it solved your issue or hit Like and Helpful if you find my response worthy.