If short description is changed, how do I take the original short description content and move it to the activity log?

rev
Kilo Contributor

As the title states, I would like to know how to put the original short description contents into the activity log is changed, after the short description is changed on an Incident form. I'm new to Service Now and   have a few ideas about how to go about this so far, but I feel lost.

Here's what I'm considering so far.

1. Create a Client Script that contains an onChange() function. The problem is that I'm not quite sure how to specifically target Short Description with the Client Script. I'd like to compare oldValue to newValue, and then if theyre not equal, add oldValue to Activity Log. However, the UI of Service Now and its options confuse me alot, but how would Service Now know I only want this to apply to Short Description so that oldValue always equals the orginal version of Short Description? So as a result, I'm afraid Service Now would write the original contents of all changed fields to the activity log.

2. UI Policy

Figured I could create a condition to check if Short Description is changed, and if so put the original contents into activity log. The problem here though is that there is no implementation of oldValue(), so how would I retrieve it?

3.Business Rule

Same deal as UI Policy, however I'm even more unfamiliar with Business Rules.

Any links to articles or suggestions that could point me in the right direction would be greatly appreciated.

Thanks!

1 ACCEPTED SOLUTION

arpitt
Tera Expert

Hi Rev,



The best way is to personalize the activities.



configu.jpg


and bring the short description field into the Selected values:



con.jpg



Regards,


Arpit


View solution in original post

8 REPLIES 8

arpitt
Tera Expert

Hi Rev,



The best way is to personalize the activities.



configu.jpg


and bring the short description field into the Selected values:



con.jpg



Regards,


Arpit


rev
Kilo Contributor

Thanks abunch!


Brad Tilton
ServiceNow Employee
ServiceNow Employee

If you just need the short description values to show up in the activity log, you can do it without any scripting. If you go to the activities label and click configure activities, you can add short description. Then it will be tracked in the activity log whenever it changes.



6b919131ac.png


rev
Kilo Contributor

Thanks Brad. You tips was really insightful and really helped me better understand the configuration options within Service Now. Thanks abunch.