Name
global.EvtMgmtCustom_PostBind_Create
Description
Make sure to select Active to activate this script. Advanced script to manipulate the Alert object after the related Configuration Item is identified, and before the Alert is created in the database. This script can also be used to abort Alert creation. The script can be used in combination with the EvtMgmtCustom_PostTransformHandler and EvtMgmtCustom_PostBind_Update scripts. Use this script with care! Inefficient code may cause a slowdown in event processing. To abort alert creation the method should return false.
Script
/**
@Param event - GlideRecord representing the event after transform. This is a temporary object. ID of the original event is in the origEventSysId parameter below
@Param alert - GlideRecord representing the alert that will be created. The configuration item can be retrieved from this alert.
@Param origEventSysId - Id of the event. The GlideRecord 'event' parameter is a temporary object, and therefore does not contain the id of the original event.
*/
(function postBindCreate(event, alert, origEventSysId){
gs.log('PostBind_Create custom script is active');
// 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);
Sys ID
d1d270097f20320002d31ccebefa9130