var gr = new GlideRecord('sys_history_line') gr.addQuery('sys_id','sysID of worknotes'); gr.query(); if(gr.next()){ gr.deleteRecord(); }
How to delete worknotes or comments on Incident ServiceNow?
Working Code Asked question July 19, 2023
var gr = new GlideRecord('sys_history_line') gr.addQuery('sys_id','sysID of worknotes'); gr.query(); if(gr.next()){ gr.deleteRecord(); }