SNC Development

ServiceNow & Other Writings by EcoStratus Technologies

Workaround For GlideRecord SetWorkflow (false) Issue

Published by

on

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. ”

Ahmed Hmeid's avatarServiceNow 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


Discover more from SNC Development

Subscribe to get the latest posts sent to your email.

Discover more from SNC Development

Subscribe now to keep reading and get access to the full archive.

Continue reading