Mark Stanger
Giga Sage

Recently a colleague asked me for assistance with a customer request. The requirement was to pop up an information or alert message when a user clicked the 'Edit' button on the 'Affected CIs' related list. The alert message would give them some information or a warning, allow the user to confirm, and then continue on to the edit screen. ServiceNow gives you a lot of control over the behavior of some buttons with the configuration of UI actions. There are other buttons in the system, however, that you can't easily control...including many related list buttons. In order to meet this requirement I created an 'onLoad' client script to attach an event listener and onClick function to the necessary button. Read on to see how it's done!


Related List Event

http://www.servicenowguru.com/scripting/client-scripts-scripting/attach-event-listener-related-list-button/