Add additional comments via script on requested items by disabling notifications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2022 02:18 AM
I want to add additional comment on requested items in bulk by disabling comments.
I am trying using scheduled job as below script but additional comments are not coming
var sc_req_item = new GlideRecord('sc_req_item');
sc_task_gr.addEncodedQuery("request.requested_for=javascript:gs.getUserID()^active=true^number=RITM0123312");// number of RITM on which comment shoulf go i.e. query
sc_req_item_gr.query();
while (sc_req_item_gr.next()) {
gs.log('Auto-reassign Scheduler : auto-reassigning the task record as part of request number- for '+sc_req_item_gr.getValue('req number'));
sc_req_item_gr.setValue('Additional comments','This ticket was closed unintentionally as part of a clean-up activity. As part of the correction the ticket has been re-opened at the same state, we apologize in advance for any inconvenience caused');//additional comment on RITMs
sc_req_item_gr.update();
}
Please guide how I can achieve this
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2022 11:34 PM
It will not post the additional comment as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2022 12:33 AM
Ok.. in that case, Prevent notification to run on update of comments ,
write script in advanced script section for this -
eg: if( current.comments.changes )
//prevent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2025 11:57 PM
Nutraxin offers high-quality vitamins, minerals & supplements for the brain, bone, joints, skin, hair, nails & more in Pakistan. Stay fit and active all day!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2025 01:52 PM
@Dan Bruhn Need support here.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************