{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":1162,"path":"api-reference/web-services/add-scripted-ext-pt-base-script-include.md","title":"Add a scripted extension point in the base application code","bundle":null,"doc_type":null,"release":"australia","body":"\n# Add a scripted extension point in the base application code\n\nAdd 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.\n\n## Before you begin\n\nRole 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.\n\n**Note:** To learn about application-specific administrator roles and delegated development, see [Access control rules in application administration apps](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/application-development/ACL-access-checks.md) and [Delegated development and deployment](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/application-development/c_DelegatedDevelopment.md).\n\n## Procedure\n\n1.  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.\n\n    To learn more about creating script includes, see [Script includes](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/c_ScriptIncludes.md).\n\n2.  In the script include, add a line of code at the location that you expect to collect and process the custom script output.\n\n    The code must contain the [GlideScriptedExtensionPoint - Scoped](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/GlideScriptedExtPtScopedAPI.md) method that identifies the extension point against which the custom script includes are registered. For example:\n\n    \\[Omitted image \"Ext\\_point\\_script\\_include\\_example\\_short.png\"\\] Alt text: Script include with Call getExtensions command in application code\n\n    **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.\n\n\n**Parent Topic:**[Creating and adding a scripted extension point](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/web-services/impl-scripted-ext-pts-base-code.md)\n\n"}}