Skip to content
Discussion options

You must be logged in to vote

There will be a dedicated ScriptInclude API in the next release, but what we recommend you do in either case is to utilize Now.include to move the contents of that field script to a dedicated file for proper editor support and syntax.
Example:

Record({
 $id: Now.ID['some-value'],
 table: 'sys_script_include',
 data: {
    script: Now.include('./my-script-file.server.js'),
    ...
  }
})

You can then also utilize the now-sdk dependencies command to download the typing information from your instance and add it to your project (goes into @types/servicenow folder) to get intellisense in your js files. Also add a tsconfig.json file to src/fluent to configure intellisense and typing information…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@arjunbasnet
Comment options

Answer selected by arjunbasnet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants