Custom Commands
Create your own SN Utils slash commands with custom searches, URL templates, and context menu integration.
Last updated: January 24, 2026
Last updated: January 24, 2026
You can create custom slash commands tailored to your workflow.
Let's create a custom incident search command:
/incident -fNumber CONTAINS $0 Or Short Description CONTAINS $0
/manage) and go to the Commands tab
incnumber,short_description
Test with /inc sap and Right Arrow — you'll see results with number and short description fields. This command works across all your instances!
The Commands tab on the Manage page is where you create, edit, and manage all your slash commands.
$0, $sysid. Start URL with / to always open in new tab| Variable | Description |
|---|---|
$0 | Search term |
$1, $2... | Individual words from the search term |
$date | Today's date (YYYY-MM-DD) |
$sysid | Current record sys_id |
$table | Current table name |
$encodedquery | Current list/filter encoded query (when available) |
$fieldname | Value from inline result fields |
$ext/ | SN Utils extension asset base URL |
Need the full reference with examples and script helpers?
See: Variables & Helper Methods
Some commands filter records but should open a different page. Use "Overwrite target URL" for this.
Example: The /uibe command searches experiences but opens UI Builder directly:

sysparm_query= — Recognized as table filtering commandadmin_panel.sys_id) available for target URL$admin_panel.sys_idRunning /uibe util:

You can create custom commands that open Code Search with pre-filled filters, so you don't need to type the same table: and field: syntax every time.
snuCodeSearch() (recommended)Create a Script command that calls the snuCodeSearch() helper with your preferred filters plus $0 for the user's search term:
codebr for Business Rules)snuCodeSearch('table:sys_script field:script ' + '$0');
Now /codebr GlideRecord opens Code Search filtered to sys_script records containing "GlideRecord" in the script field.
You can combine multiple tables and fields:
snuCodeSearch('table:sys_script table:sys_properties field:script "GlideRecord" ' + '$0');
//code alias (alternative)You can also use the // URL prefix to alias the built-in /code command:
codebr)//code table:sys_script field:script $0This expands /codebr mySearch into /code table:sys_script field:script mySearch.
/codecurrentThere's also a built-in /codecurrent command that automatically pre-fills Code Search with the current table context. On a sys_script_include form, /codecurrent getValue searches for "getValue" filtered to the sys_script_include table.
See also: snuCodeSearch() in the helper methods reference.
Add #contextmenu to a command's URL to make it available in the right-click context menu:

After saving:

Custom switches have their own dedicated Switches tab on the Manage page. Start with the guide: Slash Switches.
Advanced examples are also available on the Switches page.
Custom commands are now a Pro feature. Commands created before this change are grandfathered in and can only be edited as raw JSON. You can find the legacy JSON editors under Settings > Advanced on the Manage page.
The JSON editor includes a Convert to Custom option for Pro users, which migrates a legacy command to the full custom command format. Legacy commands may be removed in a future update, so converting them is recommended.