Make Comments mandatory when attachment were added to ticket.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 04:59 AM
Hi All,
We have an requirement where , if attachment is added to the ticket we need to make comments mandatory.
Any help would be appreciated.
Thanks!!!
1 REPLY 1
Community Alums
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 05:08 AM
Hi @Alekhya Nagabh1 ,
You can create a Business Rule and the sample advanced script :
(function executeRule(current, previous /*null when async*/) {
//gs.log("IDE Atta" + current.table_name + ":" + current.table_sys_id);
var gr = new GlideRecord(current.table_name);
gr.addQuery('sys_id', current.table_sys_id);
gr.query();
gr.next();
gr.sys_updated_by = current.sys_updated_by;
var msg = "Ajout de pièce jointe";
gr.comments = msg;
gr.update();
//gs.log("IDE" + gr.sys_id + " : " + gr.sys_updated_by + " : " + gr.number);
})(current, previous);