clearing all email logs in a sub prod instance

 discussed here:


community

---

var instURL = gs.getProperty('glide.servlet.uri'); if (instURL.indexOf('https://PRODINSTANCE.service-now.com')>-1) { gs.print('do not run on prod'); } else { var grEmails = new GlideRecord('sys_email'); grEmails.addQuery('type', 'send-ready'); grEmails.setValue('type', 'send-ignored'); grEmails.updateMultiple(); }

Comments

Popular posts from this blog

GlideRecord setValue

variable advanced reference qualifier example

URL link in addInfoMessage