Thanks for sharing Ahmed. Excellent info.
Ahmed wrote: “As part of the GlideRecord API comes the function setWorkflow(false) .

If you’ve never used this before, essentially this function switches off the running of any subsequent business rules or workflows. This is really useful in a number of scenarios, for example when you need to update a lot of records in bulk and do not want emails to be automatically sent out for each one. ”

ServiceNow Gems

As part of the GlideRecord API comes the function setWorkflow(false) .

If you’ve never used this before, essentially this function switches off the running of any subsequent business rules or workflows. This is really useful in a number of scenarios, for example when you need to update a lot of records in bulk and do not want emails to be automatically sent out for each one.

I’ve been recently working on archiving and using the OOB implementation was just too slow for us (OOB was taking approximately 5 minutes to archive one incident and 5 tasks, my custom one now archive 150 incidents, 500 tasks, all audit records, journal records, attachments etc, in less than a minute).

But while doing this, I needed to delete records from one place in ServiceNow and put them somewhere else. I didn’t want it audited that I deleted these records nor did I want…

View original post 711 more words