Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2025 07:52 AM
hi @debendudas
You can create new 'widget' and use bellow server script & client script:
server script :
var gr = new GlideRecord('sys_audit');
gr.addQuery('document_key', current.sys_id); // For a specific record
gr.orderByDesc('sys_created_on'); // Sort by most recent changes
gr.query();
var changes = [];
while (gr.next()) {
var change = {
fieldName: gr.fieldname,
oldValue: gr.old_value,
newValue: gr.new_value,
timestamp: gr.sys_created_on
};
changes.push(change);
}
data.fieldChanges = changes; // Pass the changes to the widget client
client script code:
// Display the field changes in the widget template
data.fieldChanges.forEach(function(change) {
var changeText = change.fieldName + ' changed from ' + change.oldValue + ' to ' + change.newValue;
// Append changeText to your HTML or Activity Stream view
});