Script Includes Questions
Build reusable server-side JavaScript libraries with Script Includes. Learn to extend classes, create client-callable scripts, and implement the AbstractAjaxProcessor pattern.
About Script Includes
Script Includes are reusable server-side JavaScript objects that are loaded on demand. They promote code reuse and maintainability by encapsulating logic in class-based structures. Client-callable Script Includes enable client-server communication through the GlideAjax framework, following the AbstractAjaxProcessor pattern.
Why This Matters for Your Exam
Script Includes account for 12% of the CAD exam. Questions focus on creating and using Script Includes, extending base classes, making Script Includes client-callable, and understanding scope implications.
Key Concepts to Master
Master the Script Include structure with initialize() and prototype patterns. Understand how to extend AbstractAjaxProcessor for client-callable Script Includes. Know the difference between scoped and global Script Includes and when each is appropriate.
Exam Tips
Remember that client-callable Script Includes must extend AbstractAjaxProcessor and have the 'Client callable' checkbox selected. The getParameter() method retrieves values passed from GlideAjax. Script Includes are loaded on demand — they don't execute until called.
Practice Questions
12 questions availableWhat is the primary purpose of a Script Include in ServiceNow?
👆 Click an option above to select your answer
Why is the 'current' object NOT available inside a Script Include?
👆 Click an option above to select your answer