Create a script macro for the syntax editor
task australia Updated Sep 10, 2026 1 min read t_ManageScriptMacros.md
Administrators can define new script macros or modify existing script macros.
Before you begin
Role required: admin
About this task
Script macros provide shortcuts for typing commonly used code. Several script macros are available by default. Administrators can define new or modify existing script macros.
Procedure
-
Navigate to All > System Definition > Syntax Editor Macros.
-
Select New or select the macro to edit.
-
Define the macro details with the fields listed in the table below.
Field Description Name Macro keyword text users type to insert macro text. Comments Description of the macro. This text appears when the user types help. Text Full macro text that replaces the name in the editor.
Parent Topic:JavaScript syntax editor
44 lines · 1.5 KB
---
title: Create a script macro for the syntax editor
description: Administrators can define new script macros or modify existing script macros.
locale: en-US
canonical_url: https://www.servicenow.com/docs/r/australia/api-reference/scripts/t\_ManageScriptMacros.html
release: australia
product: Scripts
classification: scripts
topic_type: task
last_updated: "2026-09-10"
reading_time_minutes: 1
breadcrumb: [JavaScript syntax editor, Explore, Scripting, API implementation, API implementation and reference]
---
# Create a script macro for the syntax editor
Administrators can define new script macros or modify existing script macros.
## Before you begin
Role required: admin
## About this task
Script macros provide shortcuts for typing commonly used code. Several script macros are available by default. Administrators can define new or modify existing script macros.
## Procedure
1. Navigate to **All** > **System Definition** > **Syntax Editor Macros**.
2. Select **New** or select the macro to edit.
3. Define the macro details with the fields listed in the table below.
|Field|Description|
|-----|-----------|
|Name|Macro keyword text users type to insert macro text.|
|Comments|Description of the macro. This text appears when the user types help.|
|Text|Full macro text that replaces the name in the editor.|
**Parent Topic:**[JavaScript syntax editor](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/c_SyntaxEditor.md)
| title | Create a script macro for the syntax editor |
| description | Administrators can define new script macros or modify existing script macros. |
| locale | en-US |
| canonical_url | https://www.servicenow.com/docs/r/australia/api-reference/scripts/t\_ManageScriptMacros.html |
| release | australia |
| product | Scripts |
| classification | scripts |
| topic_type | task |
| last_updated | 2026-09-10 |
| reading_time_minutes | 1 |
| breadcrumb | JavaScript syntax editorExploreScriptingAPI implementationAPI implementation and reference |