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.
How to stop creating alerts for CI's that are currently in Un-Installed Non-Operational status - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • How to stop creating alerts for CI's that are currently in Un-Installed Non-Operational status
KB0692596

How to stop creating alerts for CI's that are currently in Un-Installed Non-Operational status


1756 Views Last updated : Jan 3, 2025 public Copy Permalink
KB Summary by Now Assist

Issue

Description


How to stop creating alerts for CI's in non-operational or un-installed status?

Procedure


There is a Out of the box script include called EvtMgmtCustom_PostBind_Create, this is after we bind the CI but before we create an alert.

This script include is  not active out of the box but you can define your logic in this script include to ignore the creation of the alert based on Operational status. 

 For example, You can use this  piece of code which will ignore any CI with operational status (4,2,3). you will have to define these numbers based on the choice list and your requirements. You can add more logic around this code. If returned false, it will skip creation of alert. 

 

*****Sample code to ignore creating alerts if the CI is in operational status (4,2,3)******


(function postBindCreate(event, alert, origEventSysId){ 
gs.log('PostBind_Create custom script is active'); 

var ignore_statuses = ['4','2','3']; // 

var ciid = alert.cmdb_ci.toString(); 
if(JSUtil.notNil(ciid)){ 
var ciGr = new GlideRecord('cmdb_ci'); 
if (ciGr.get(ciid)){ 
var operation_status = ci.operational_status.toString(); 
if (ignore_statuses.indexOf(operation_status) != -1) 
return false; 
} 
} 

// In this part of the function make any changes to alert using glide record interface. E.g: 
// alert.setValue('source', 'new source'); 

// To abort alert creation return false; 
// returning a value other than boolean will result in an error 
return true; 
})(event, alert, origEventSysId); 

Applicable Versions


Jakarta, Kingston, London

 


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.