Can I update work notes on em_alert table

SK5555
Tera Contributor

PLEASE GIVE  A REFERENCE CODE 

1 REPLY 1

Nilesh Pol
Tera Guru

@SK5555 Yes, You can use GlideRecord to update the work_notes field on the em_alert table. For example, to update work notes for a specific alert, you can use the following script:

var alertGR = new GlideRecord('em_alert');
if (alertGR.get('sys_id', 'your_alert_sys_id')) { 
alertGR.work_notes = 'This is the new work note that I want to add.'; 
alertGR.update(); 
} else {
gs.info('Alert record not found');
}