- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 02-14-2017 03:30 AM
Basically this is extension of treycarroll work done in Visual Studio Code Snippets for common ServiceNow Syntax Macros I have create snippets for Visual Studio Code.
Download javascript.json file and put it:
- Windows
%APPDATA%\Code\User\snippets\javascript.json - Mac
$HOME/Library/Application Support/Code/User/snippets/javascript.json - Linux
$HOME/.config/Code/User/snippets/javascript.json
Example of snippet description:
{
"Insert GlideRecord": {
"prefix": "grins",
"body": [
"var gr = new GlideRecord('${1:TableName}');",
"gr.Initialize();",
"gr.${2:UpdateColumnName} = '${3:UpdateColumnValue}';",
"gr.insert();"
],
"description": "Template for inserting a GlideRecord record."
}
}
Start your Visual Studio Code and if you create JavaScript file you should be able to use these macros.
When template generate use Tab to jump to the next editable area:
Feel free to update macros but don't forget to share it
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks for this, I have downloaded the file and followed the step, but I am not getting the methods of GlideRecord as shown above in my Visual Studio Code.
Is that something I am missing?