ServiceNow workflow – A sample Script to update all the catalog tasks with work notes

The following code can be used in the run script activity of the workflow to update the work notes or any other fields of all the catalog tasks [Conditionally we can update the catalog tasks as well] var catalogTaskGR = new GlideRecord(‘sc_task’); catalogTaskGR.addQuery(‘request_item’, current.sys_id); catalogTaskGR.query(); while(catalogTaskGR.next()) { catalogTaskGR.work_notes = “The ServiceDesk team has started working […]