---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# Add a scripted extension point in the base application code

# Add a scripted extension point in the base application code {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Add the scripted extension point into a script include in the base application code.
To add the extension point, include an API call that identifies the location at which
registered custom artifacts execute.

## Before you begin

Role required: You must have the specific role for the developer or administrator of the application, or you must have the admin role. You must first create a scripted extension point before you can add it to a script include in the application code.  
Note:  
To learn about application-specific administrator roles and delegated development, see [Access control rules in
application administration apps](https://www.servicenow.com/docs/access?context=ACL-access-checks&version=xanadu&pubname=xanadu-application-development&ft:locale=en-US) and [Delegated development and
deployment](https://www.servicenow.com/docs/access?context=c_DelegatedDevelopment&version=xanadu&pubname=xanadu-application-development&ft:locale=en-US).

## Procedure

1. In the application code, access the existing script include that you want to add a scripted extension point to, or create a new script include.  
   To learn more about creating script includes, see [Script includes](https://servicenow-prod.fluidtopics.net/i5uQxl1FIiH~ZUE4r4dqwQ#c_ScriptIncludes "Script includes are used to store JavaScript that runs on the server.").
2. In the script include, add a line of code at the location that you expect to collect and process the custom script output.  
   The code must contain the [GlideScriptedExtensionPoint - Scoped](https://servicenow-prod.fluidtopics.net/nTQSRl64SNz90DUTD4_EnA#GlideScriptedExtPtScopedAPI "The GlideScriptedExtensionPoint API provides a method that returns the extension instances associated with a specified extension point.") method that identifies the extension point against which the custom
   script includes are registered. For example:  
   Note:  
   It is also a good practice to deliver error messages for application customizers when their custom scripts run in an extension instance. If something fails when the function returns arguments to the extension point, the error messages include information about how to troubleshoot the custom script.
{#add-scripted-ext-pt-base-script-include__steps_mfs_mgn_pdb}

