Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Email Notifications Not being Fired due to setWorkflow(false) or setUseEngines(false) - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Email Notifications Not being Fired due to setWorkflow(false) or setUseEngines(false)
KB0858407

Email Notifications Not being Fired due to setWorkflow(false) or setUseEngines(false)


5171 Views Last updated : Feb 15, 2025 public Copy Permalink
KB Summary by Now Assist

Issue

If you have an issue where email Notifications are not being fired, meaning there are no Events[sysevent] or Emails[sys_email] being generated, it may be because 'engines' used to generate emails, among other things, are disabled. It's sometimes been seen that custom Business Rules (BRs) deployed on customer instances use one or both of these GlideRecord functions, that when run, suppress Workflows or other internal 'engines' from running during an update or insert operation:

setWorkflow(false)

setUseEngines(false)

A call to setWorkflow(false) or setUseEngines(false) (both part of the GlideRecord API) will completely disable not just Workflows but the whole Notification Engine as well as Auditing, and so stop any Notifications (email or SMS) from being generated.
 
 

Release

All ServiceNow versions

Cause

Disabling the Notification Engine with either of these functions prevents Notification emails from being generated.

Resolution

If the customer has a BR that uses setWorkflow(false) or setUseEngines(false) they can still run it, but it *must* be run as an after BR with an Order of 1001 or greater, see Execution order of scripts and engines.

NOTE: Remember to set back to 'true' after a current.update() in a business rule:  setWorkflow(true), in a line after setWorkflow(false); current.update(), in order for business rules and other engines to run again. 

Related Links

setUseEngines: GlideRecord-setUseEngines_Boolean

 

setWorkflow: GlideRecord-setWorkflow_Boolean

 


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.