Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2024 03:14 AM
Try bellow script in your action :
// Get the current logged-in user
var currentUser = gs.getUserID();
// GlideRecord to update the active comments field (assuming the table is 'incident')
var gr = new GlideRecord('incident');
if (gr.get(current.sys_id)) {
// Update the comments with the logged-in user's ID
gr.comments = "File attached by " + gs.getUserName(); // Add your custom message here
gr.setValue('sys_updated_by', gs.getUserName()); // Update sys_updated_by to the logged-in user
gr.update(); // Update the record
}