When the value of a particular field changes , work notes should populate the change on Incident table

sonita
Giga Guru

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:

find_real_file.png

current.work_notes = u_change_tracking;

Any help would be appreciated.

1 ACCEPTED SOLUTION

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


View solution in original post

9 REPLIES 9

aswinsiddaling2
Kilo Guru

Hi Soni,



Why do you want to copy the change to the Work notes field? If you want to see those changes in the Incident form, you can add this field in the Activity Log formatter and you can see the changes made to this field.



Let me know if this helps.



Thanks and Regards,


Aswin Siddalingam


That's a very good point Aswin , but this is a requirement from the customer!


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


I don't think you want to use current.update(), won't that create a duplicate record on each insert/update?