The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Save a Background Script for future use

JahanzebB
Mega Guru

During a recent TechNow video, I noticed that one of the Developer Evangelists was able to call a Background script by entering a shortcut in the Scripts - Background window. For example 'tn1235=

This resulted in a saved background script being populated in the background script window. I have some saved background scripts that I need to copy over from a text editor manually. How do I save a background script for future use?

Thanks,

JB

8 REPLIES 8

Allen Andreas
Administrator
Administrator

Hmm...curious if it was just a script include? Chuck would know.

 


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

simonbergstedt
Tera Guru

You could use syntax editor macros to create macros 

https://docs.servicenow.com/bundle/geneva-servicenow-platform/page/script/general_scripting/reference/r_SyntaxEditorMacros.html

and fix scripts which is saved scripts that you can run in the background if you want

https://docs.servicenow.com/bundle/kingston-application-development/page/build/applications/concept/c_FixScripts.html

Simon, 

 

Thank you providing the links. I tested the syntax editor macros and those work great from a client script or background script. Is there a way to call any of these from a background script?

 

Thanks,

JB

You can also store those scripts in script include and call them from Background script;


Please mark this response as correct or helpful if it assisted you with your question.