### Create Virtual Environment and Install Dependencies Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Specialized Areas/Agile Development/Burndown Chart/README.md Use these commands to create a virtual environment and install the necessary Python packages for the burndown chart script. Ensure you activate the virtual environment before installing dependencies. ```bash python3 -m venv .venv macOS/Unix: source .venv/bin/activate Windows: .venv\Scripts\activate pip install -r requirements.txt ``` ```bash pip install -r equirements.txt ``` -------------------------------- ### Example YAML Output Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Server-Side Components/Script Includes/JSONtoYAML/README.md This is the expected YAML output after converting the example JSON input. ```yaml --- hello: world hello2: - hello - world ``` -------------------------------- ### Example GET Request for Group Members Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Integration/Scripted REST Api/Group Membership API/README.md Use this GET request to retrieve members of a specific group. Ensure you replace '' with your ServiceNow instance name and provide a valid 'groupName'. ```http GET https://.service-now.com/api/1819147/group_membership_api/members?groupName=Hardware ``` -------------------------------- ### Full Example: Assign Role for a Day Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Server-Side Components/Script Includes/Assign role for a day Util/README.md A complete example demonstrating how to import and use the assignRoleToUserForADay utility with specific user and role IDs. Includes success and error logging. ```javascript var assignRoleToUserForADay = require('./Utility/AssignRoleToUserForADay'); var userId = '12345'; var roleId = 'admin'; assignRoleToUserForADay(userId, roleId) .then(() => { console.log('Role assigned successfully.'); }) .catch((error) => { console.error('Error assigning role:', error); }); ``` -------------------------------- ### Install Jekyll and Dependencies Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/PAGES.md Installs Jekyll and its required dependencies using RubyGems and Bundler. This is a prerequisite for running the site locally. ```bash gem install jekyll bundler bundle install ``` -------------------------------- ### BenchmarkRunner Example Server-Side Call Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Server-Side Components/Script Includes/BenchmarkRunner/README.md Demonstrates how to use the BenchmarkRunner to compare the performance of JSON stringification and parsing. This example sets up arguments, instantiates the BenchmarkRunner, and calls compareFunctions to print the results. ```javascript var bmr; var argsArray = [ { "some_object": { "some_object": { "some_object": { "some_number": 123, "some_string": "abc123", "some_boolean": 123, "some_null": null, "some_method": function() { return "some_string"; } } } } } ]; argsArray.push(JSON.stringify(argsArray[0])); /* argsArray[0] now contains the object, and argsArray[1] contains the stringified object. We'll test whether it's faster to stringify an object, or to parse an object string. */ bmr = new BenchmarkRunner() bmr.printComparisonResults( bmr.compareFunctions( thingOne, thingTwo, 20000, argsArray ), 20000 ); function thingOne(arrArgs) { var strObj = JSON.stringify(arrArgs[0]); return strObj; } function thingTwo(arrArgs) { var objObj = JSON.parse(arrArgs[1]); return objObj; } ``` -------------------------------- ### Example Usage of add_business_days Function Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Server-Side Components/Script Includes/Calculate Business days dynamically/readme.md This example demonstrates how to call the add_business_days function with a specific date and number of days, and prints the result to the console. ```javascript gs.print(add_business_days('2025-10-24 12:00:00', 5)); // Output: 2025-10-31 (skips weekend) ``` -------------------------------- ### Example JSON Input Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Server-Side Components/Script Includes/JSONtoYAML/README.md This is an example of the JSON object structure that can be passed to the conversion function. ```json { hello: 'world', hello2: [ 'hello', 'world' ] } ``` -------------------------------- ### Usage Example for Dynamic Endpoint Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Integration/RESTMessageV2/DynamicOutboundEnpoints/README.md This example demonstrates how to instantiate the Script Include, retrieve the dynamic endpoint URL, and use it with RESTMessageV2. It includes error handling for cases where the endpoint URL cannot be retrieved. ```javascript var endpointConfig = new EndpointConfig(); var endpointUrl = endpointConfig.getEndpoint(); if (endpointUrl) { gs.info("Endpoint URL: " + endpointUrl); var request = new sn_ws.RESTMessageV2(); request.setEndpoint(endpointUrl); // ... rest of your integration logic } else { gs.error("Failed to retrieve endpoint URL."); } ``` -------------------------------- ### Custom Alert HTML Examples Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Specialized Areas/Styles/ServiceNow Custom Style/README.md Examples of HTML div elements demonstrating different types of custom alerts using specific classes. ```html
This is an alert message!
This is a success message!
This is an info message!
This is a warning message!
``` -------------------------------- ### Example Incident Data for AI Processing Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Server-Side Components/Business Rules/openAI/README.md This table shows example input data for an incident, including the Short Description and Work Notes, which would be sent to ChatGPT for analysis. ```text | Field | Value | | ------------------ | ------------------------------------------------------ | | Short Description | VPN not connecting for remote users | | Work Notes | User reports frequent disconnections during peak hours | ``` -------------------------------- ### Example: Valid JSON String Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Server-Side Components/Background Scripts/Check String is Valid JSON/README.md Demonstrates a valid JSON string that can be successfully parsed. ```javascript const str = '{ "firstName": "John", "lastName": "Doe" }'; ``` -------------------------------- ### Example of Valid URL in JavaScript Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Specialized Areas/Regular Expressions/URL Validation/README.md Demonstrates a valid URL string that matches the defined regex pattern. ```javascript const url = "www.servicenow.com"; ``` -------------------------------- ### Get Start of Quarter Ago - GlideSystem Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Core ServiceNow APIs/GlideSystem/date-time/README.md Returns a date and time for the start of the quarter, a specified number of quarters ago. Use this to reference the beginning of a past quarter. ```javascript gs.quartersAgoStart(quarters) ``` -------------------------------- ### Example Usage of RestMessageUtils Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Server-Side Components/Script Includes/RestMessageUtils/README.md Demonstrates how to instantiate and execute the RestMessageUtils utility with a sample configuration object. The response body is then printed to the console. ```javascript /* var obj = { endPoint: 'https://instancename.service-now.com/api/now/table/problem', queryParams: { sysparm_query: 'active=true', sysparm_limit: 2, sysparm_fields: 'number,short_description' }, httpMethod: 'POST', authType: 'BasicCreds', userName: 'admin', password: gs.getProperty('dev204127.admin.password'), requestHeaders: { Accept: 'Application/JSON' }, }; var resp = new RestMessageUtils(obj, 'Test RestMessage Utils', 'Default GET').execute(); gs.print(resp.getBody()) */ ``` -------------------------------- ### Get Start of Month Ago - GlideSystem Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Core ServiceNow APIs/GlideSystem/date-time/README.md Returns a date and time for the start of the month, a specified number of months ago. Use this to reference the beginning of a past month. ```javascript gs.monthsAgoStart(months) ``` -------------------------------- ### Bookmarklet URL Construction Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Specialized Areas/Browser Bookmarklets/Load List with Query/readme.md This example shows how to construct a URL for a ServiceNow list that includes a sysparm_query parameter. This allows for pre-filtering the list when the URL is accessed, for instance, via a bookmarklet. ```url https://instancename.service-now.com/now/nav/ui/classic/params/target/sc_request_list.do%3Fsysparm_query%3Du_addressLIKEmain%2520st ``` -------------------------------- ### Get Start of Minute Ago - GlideSystem Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Core ServiceNow APIs/GlideSystem/date-time/README.md Returns a date and time for the start of the minute a specified number of minutes ago. Use this to reference the beginning of a past minute. ```javascript gs.minutesAgoStart(minutes) ``` -------------------------------- ### Initialize and Run Record Archiver Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Server-Side Components/Script Includes/Dynamic Record Archiving/README.md Instantiate the RecordArchiver with table name, date field, archive threshold in days, and archive mode. Then, call archiveRecords() to execute the archiving process. ```javascript var archiver = new RecordArchiver('incident', 'opened_at', 365, 'flag'); archiver.archiveRecords(); ``` -------------------------------- ### Delegate Data Structure Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Core ServiceNow APIs/GlideQuery/Get Delegates/README.md This is an example of the JSON structure returned when retrieving delegates. It includes the delegate's name, sys_id, and the start and end dates of their delegation. ```json [ { "name": "Mary Cruse", "sys_id": "46d77b47a9fe1981007c0b3faff3edf8", "starts": "2023-10-02 14:03:24", "ends": "2100-01-01 23:59:59" }, { "name": "Fred Kunde", "sys_id": "75826bf03710200044e0bfc8bcbe5d2b", "starts": "2023-10-01 14:03:01", "ends": "2100-01-01 23:59:59" } ] ``` -------------------------------- ### Initialize Log Utils Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Server-Side Components/Script Includes/Log Utils/README.md Instantiate the log utility with parameters to control logging behavior. Set the first parameter to true to enable logs, and provide a comma-separated string of method names to exclude from logging. ```javascript var utils = new scope.utils(true, 'methodName1,methodName2'); ``` -------------------------------- ### minutesAgoStart(Number minutes) Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Core ServiceNow APIs/GlideSystem/date-time/README.md Returns a date and time for the start of the minute a certain number of minutes ago. ```APIDOC ## minutesAgoStart(Number minutes) ### Description Returns a date and time for the start of the minute a certain number of minutes ago. ### Method GlideSystem ### Endpoint N/A (Server-side JavaScript API) ### Parameters #### Path Parameters * **minutes** (Number) - Required - The number of minutes ago. ### Request Example ```javascript var gdt = new GlideDateTime(); // Assuming GlideDateTime is available gdt.minutesAgoStart(5); ``` ### Response #### Success Response GlideDateTime object representing the start of the minute, the specified number of minutes ago. #### Response Example ```javascript // Example output (actual value will vary) "2023-11-07 10:55:00" ``` ``` -------------------------------- ### Get Beginning of Last Month - GlideSystem Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Core ServiceNow APIs/GlideSystem/date-time/README.md Returns the date and time for the beginning of last month in GMT. Use this to reference the start of the previous calendar month. ```javascript gs.beginningOfLastMonth() ``` -------------------------------- ### Get User Capacity and Availability (Daily) Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Specialized Areas/Resource Management/Resource Capacity And Availability Viewer (Daily Basis)/README.md Call this function in 'Scripts - Background' to retrieve hourly capacity and availability for a user within a date range. Requires 'Resource Management' module. Arguments are User ID/Sys ID, Start Date (YYYY-MM-DD), and End Date (YYYY-MM-DD). ```javascript getUserCapacity("ae44946c835cba90cac7a5e0deaad38f", "2025-01-01", "2025-02-28"); ``` ```javascript getUserCapacity("abel.tuter", "2026-10-01", "2026-10-31"); ``` -------------------------------- ### Get Field Display Value in Different Languages Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Core ServiceNow APIs/GlideRecord/Gets the display value according to the specified language/README.md Temporarily set the user's language preference to 'ja' for Japanese and 'en' for English to retrieve the display value of the 'state' field. The original language preference is restored afterward. Ensure the relevant language plugin is installed. ```javascript var gr = new GlideRecord("incident"); gr.setLimit(1); gr.query(); gr.next(); var user = gs.getUser(); var lang = user.getPreference("user.language"); // Japanese user.setPreference("user.language", 'ja'); var outputJA = '' + gr.state.getLabel() + ' = ' + gr.state.getDisplayValue(); // English user.setPreference("user.language", 'en'); var outputEN = '' + gr.state.getLabel() + ' = ' + gr.state.getDisplayValue(); gs.info(outputJA + ' / ' + outputEN); user.setPreference("user.language", lang); ``` -------------------------------- ### JSONPath Script Include Setup Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Server-Side Components/Script Includes/JSONPath/README.md Instructions for setting up the JSONPath script include in ServiceNow. This involves creating a script include and populating its script field with the JSONPath.js content. ```javascript var result = JSONPath([options,] path, json, callback, otherTypeCallback); ``` -------------------------------- ### onStart Script - Define Global Manager Map Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Server-Side Components/Transform Map Scripts/Global Variable in Transform Map/README.md This script runs once at the start of the transform execution. It queries the sys_user table to build a map of manager emails to their sys_ids, storing it in `this.managerMap` for access by subsequent scripts. ```javascript var managerMap = {}; var grUser = new GlideRecord('sys_user'); grUser.query(); while (grUser.next()) { if (grUser.email) { managerMap[grUser.email.toString().toLowerCase()] = grUser.getUniqueValue(); } } this.managerMap = managerMap; gs.info('Manager map preloaded with ' + Object.keys(managerMap).length + ' entries.'); ``` -------------------------------- ### Serve Jekyll Site Locally Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/PAGES.md Starts a local development server for the Jekyll site. The site will be accessible at http://localhost:4000. ```bash bundle exec jekyll serve ``` -------------------------------- ### Convert Base64 to Hexadecimal GUID Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Server-Side Components/Script Includes/Convert base64 to Hex (Object GUID)/README.md Use this method in LDAP Transform scripts to convert Base64 encoded GUIDs to their hexadecimal representation. This is essential for integrations that require the GUID in hex format, such as the AD V2 Spoke. ```javascript var base64Code ='ayn8QMpHEGezHQDdAQZi2g=='; gs.print(new global.LDAP_AD_Utils().base64ToHex(base64Code)); ``` -------------------------------- ### Instantiate and Use Script Include Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Integration/Attachments/attachmentToXMLParse/README.md Instantiate the 'getXMLContent' Script Include and call its method to retrieve XML content from an attachment. ```javascript var xmlContent = new getXMLContent(); ``` ```javascript gs.print(xmlContent.getXMLContentFromAttachment('sys_data_source',)); ``` -------------------------------- ### Custom Table HTML Example Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Specialized Areas/Styles/ServiceNow Custom Style/README.md Example of an HTML table structure that can be styled using a custom class. ```html
Header 1 Header 2
Row 1, Cell 1 Row 1, Cell 2
``` -------------------------------- ### Custom Input HTML Example Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Specialized Areas/Styles/ServiceNow Custom Style/README.md Example of an HTML input field that can be styled using a custom class. ```html ``` -------------------------------- ### Custom Button HTML Example Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Specialized Areas/Styles/ServiceNow Custom Style/README.md Example of an HTML button element that can be styled using a custom class. ```html ``` -------------------------------- ### Importing Record Operation Utilities Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Client-Side Components/UX Client Script Include/Record Operation Utilities/README.md Demonstrates how to import the createRecord, updateRecord, and deleteRecord functions from the 'global.Record Operation Utilities' client script include. ```javascript function handler({api, event, helpers, imports}) { const { createRecord, updateRecord, deleteRecord } = imports['global.Record Operation Utilities'](); } ``` -------------------------------- ### Server-Side Script Call Example Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Server-Side Components/Script Includes/Hybrid Script Include for AJAX or Server Side Parameters/README.md This code demonstrates how to call the hybrid script include directly from another server-side script, such as a business rule or another script include. Parameters are passed as arguments to the method. ```javascript var pr = new example_hybrid_parameters(); result = pr.checkPrereq(parm1, parm2, parm3, parm4); return result; ``` -------------------------------- ### Example Notification Message Format Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Server-Side Components/Script Includes/Sends Slack/Teams notifications when specific fields change on configured tables/README.md This is an example of the notification message that will be sent to Slack or Teams when a configured field changes. ```text 🛠️ ServiceNow — Field Update Notification Record: Incident INC0010001 Description: Unable to access VPN • priority changed from 4 - Low → 2 - High • assigned_to changed from John → Alex ``` -------------------------------- ### Generated SQL Query Example Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Server-Side Components/Background Scripts/SQL Checker/README.md This is an example of the SQL query logged when gs.trace(true) is enabled for a GlideRecord query. ```sql SELECT task0.`sys_id` FROM task task0 IGNORE index(sys_created_on) WHERE task0.`sys_class_name` = 'incident' ORDER BY task0.`sys_created_on` DESC LIMIT 0, 10 ``` -------------------------------- ### Initialize Page with Syntax Highlighting and Subcategories Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/pages/client-side-components.html Initializes the page by highlighting syntax using Prism.js and loading all subcategories for client-side components. This function runs after the DOM is fully loaded. ```javascript document.addEventListener('DOMContentLoaded', function() { // Initialize syntax highlighting Prism.highlightAll(); // Load all subcategories loadAllSubcategories(); }); ``` -------------------------------- ### Example Alphanumeric Strings Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Specialized Areas/Regular Expressions/Regular-expression-for-alphanumeric-characters/README.md An array of example strings to test the alphanumeric validation function. Includes valid and invalid cases. ```javascript var examples = [ "abc123", // Valid "ABC", // Valid "123", // Valid "abc123!", // Invalid (contains '!') "hello world", // Invalid (contains space) "123-456", // Invalid (contains '-') ]; ``` -------------------------------- ### monthsAgoStart(Number months) Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Core ServiceNow APIs/GlideSystem/date-time/README.md Returns a date and time for the start of the month a certain number of months ago. ```APIDOC ## monthsAgoStart(Number months) ### Description Returns a date and time for the start of the month a certain number of months ago. ### Method GlideSystem ### Endpoint N/A (Server-side JavaScript API) ### Parameters #### Path Parameters * **months** (Number) - Required - The number of months ago. ### Request Example ```javascript var gdt = new GlideDateTime(); // Assuming GlideDateTime is available gdt.monthsAgoStart(3); ``` ### Response #### Success Response GlideDateTime object representing the start of the month, a specified number of months ago. #### Response Example ```javascript // Example output (actual value will vary) "2023-08-01 00:00:00" ``` ``` -------------------------------- ### Test SmartData in Background Scripts Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Server-Side Components/Script Includes/SmartData/readme.md Run these examples in Background Scripts to test the SmartData utility. It demonstrates count, stats, one, and describe functions. ```javascript var sd = new SmartData(); gs.info('Count: ' + sd.count('incident', 'active=true')); gs.info(JSON.stringify(sd.stats('incident', {fn:'AVG', field:'time_worked'}, ['assignment_group'], 'active=true'))); gs.info(JSON.stringify(sd.one('incident', 'active=true', ['number','priority'], '-sys_created_on'))); gs.info(JSON.stringify(sd.describe('problem'))); ``` -------------------------------- ### Complex SQL Query Example Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Server-Side Components/Background Scripts/SQL Checker/README.md An example of a more complex SQL query generated for incident records, including multiple WHERE conditions and selected fields. ```sql SELECT task0.`parent`, task0.`a_ref_3` AS `caused_by`, task0.`watch_list`, task0.`upon_reject`, task0.`sys_updated_on`, task0.`a_str_5` AS `origin_table`, task0.`approval_history`, task0.`skills`, task0.`number`, task0.`state`, task0.`sys_created_by`, task0.`knowledge`, task0.`order`, task0.`cmdb_ci`, task0.`delivery_plan`, task0.`impact`, task0.`contract`, task0.`active`, task0.`work_notes_list`, task0.`priority`, task0.`sys_domain_path`, task0.`rejection_goto`, task0.`business_duration`, task0.`group_list`, task0.`approval_set`, task0.`wf_activity`, task0.`universal_request`, task0.`short_description`, task0.`correlation_display`, task0.`work_start`, task0.`delivery_task`, task0.`additional_assignee_list`, task0.`a_int_1` AS `notify`, task0.`sys_class_name`, task0.`service_offering`, task0.`closed_by`, task0.`follow_up`, task0.`a_ref_7` AS `parent_incident`, task0.`a_ref_5` AS `reopened_by`, task0.`reassignment_count`, task0.`assigned_to`, task0.`variables`, task0.`sla_due`, task0.`comments_and_work_notes`, task0.`agile_story`, task0.`escalation`, task0.`upon_approval`, task0.`correlation_id`, task0.`made_sla`, task0.`a_int_6` AS `child_incidents`, task0.`a_int_8` AS `hold_reason`, task0.`task_effective_number`, task0.`a_ref_6` AS `resolved_by`, task0.`sys_updated_by`, task0.`opened_by`, task0.`user_input`, task0.`sys_created_on`, task0.`sys_domain`, task0.`route_reason`, task0.`a_int_4` AS `calendar_stc`, task0.`closed_at`, task0.`business_service`, task0.`a_str_11` AS `business_impact`, task0.`a_ref_2` AS `rfc`, task0.`time_worked`, task0.`expected_start`, task0.`opened_at`, task0.`work_end`, task0.`a_dtm_1` AS `reopened_time`, task0.`a_dtm_2` AS `resolved_at`, task0.`a_ref_4` AS `caller_id`, task0.`a_str_3` AS `subcategory`, task0.`work_notes`, task0.`a_str_7` AS `close_code`, task0.`assignment_group`, task0.`a_int_5` AS `business_stc`, task0.`a_str_10` AS `cause`, task0.`description`, task0.`a_str_2` AS `origin_id`, task0.`calendar_duration`, task0.`close_notes`, task0.`sys_id`, task0.`contact_type`, task0.`a_int_2` AS `incident_state`, task0.`urgency`, task0.`a_ref_1` AS `problem_id`, task0.`company`, task0.`activity_due`, task0.`a_int_3` AS `severity`, task0.`comments`, task0.`approval`, task0.`due_date`, task0.`sys_mod_count`, task0.`a_int_7` AS `reopen_count`, task0.`location`, task0.`a_str_1` AS `category` FROM task task0 WHERE task0.`sys_class_name` = 'incident' AND task0.`sys_id` IN ('9060975f472d4210a53cdbe411', '9e7f9864532023004247ddeeff7b121f', 'd71f7935c0a8016700802b64c67c11c6', 'a9a16740c61122760004fe9095b7ddca', 'd71b3b41c0a8016700a8ef040791e72a', 'd7195138c0a8016700fd68449cfcd484', 'd7158da0c0a8016700eef46c8d1f3661', 'ef43c6d40a0a0b5700c77f9bf387afe3', 'ef4225a40a0a0b5700d0b8a790747812', 'a9e30c7dc61122760116894de7bcc7bd') ``` -------------------------------- ### Discover and Invoke Extension Points Source: https://github.com/servicenowdevprogram/code-snippets/blob/main/Server-Side Components/Extension Points/README.md Demonstrates how to dynamically discover and invoke extension point implementations based on a given scope. Ensure the extension point API name is correctly specified. ```javascript var eps = new GlideScriptedExtensionPoint().getExtensions("scope.InterfaceName"); for (var i = 0; i < eps.length; i++) { if (eps[i].handles("criteria")) { eps[i].process(); } } ```