overrride ACL blocking cat item attachments, remove the attachments where edit not displayed

 override ACL blocking cat item attachments, remove the attachments where edit not displayed when an insert and stay has been done on a cat item with images, and the picture/icon become uneditable on the newly created item:


ACL:

https://dev<>.service-now.com/nav_to.do?uri=sys_security_acl.do?sys_id=cb1bd1d48f13210009ec4b8cb6e79ad0

fix script to tidy up:

var instURL = gs.getProperty('glide.servlet.uri'); if (instURL.indexOf('https://PRODINST.service-now.com')>-1) { gs.print('do not run on prod'); } else { var sCatItemSYSID = ""; sCatItemSYSID = "b25f293ddbfb9010d6ce3313f39619a9"; if (sCatItemSYSID != "") { var gr = new GlideRecord('sc_cat_item'); if (gr.get("sys_id", sCatItemSYSID)) { gs.print('hello' + gr.name); gs.print(gr.picture);
//gr.picture = ''; //gr.icon= '';//gr.update();
} } }

Comments

Popular posts from this blog

GlideRecord setValue

Running transform maps asynchronously

Post a command to the ECC queue for the mid server to initiate a powershell file copy