Chuck Tomasi
Tera Patron

As someone who used Scripts - Background A LOT, This one just makes me giddy with excitement. We finally have a first class editor with all the features you expect (except saving, of course.) Formatting, commenting, search, LINE NUMBERS, intellisense/introspection, error indicators, color coded keywords, the thumbnail scroller (or whatever the official name is for that thing) on the right. I love it!

 

ChuckTomasi_0-1705511208393.png

 

If you're not familiar, Scripts - Background lets you run server-side code on-demand. This carries a risk - This is not recommended for production instances, but can be a real time saver in dev if you need to reset fields across records, test triggering events, Flow actions, etc.

 

You can find it by navigating to All > System Definition > Scripts - Background.

 

Tip: Delete and recreate bookmarks you may have already created or you'll be disappointed. If you use the one under System Definition and look at the URL, you'll notice that it goes to sys.scripts.modern.do. However, if you have an existing bookmark, it will still navigate to sys.scripts.do giving you the old UI.

 

And yes, we know there are wonderful third party add-ons like Xplore and SNUtils. These are wonderful tools and you are welcome to continue using them. My initial tests with SNUtils shows that it doesn't conflict with the new editor. My guess is that the new editor is using a different id in the DOM that it doesn't try to modify. This may change in the future once @Arnoud Kooi gets his hands on Washington D.C. 🙂

22 Comments
Not applicable

Fantastic!  A much needed improvement.  Thank you, Chuck & ServiceNow team.

 

(I used Scheduled Script Executions [table sysauto_script] instead of Scripts Background, for years, because the editor there was so much more powerful.)

Johannes Mweli
Giga Guru

This is great news indeed

Not applicable

This is exactly what I've been waiting for!

DorianK
Tera Expert

I welcome the change wohoo!!

 

I wonder what other quality of life things will improve.

 

What about flow designer scripts ;). I would love to be able to pop out those little flow variable screens or use formatting easily in the script section of a custom action.

 

Imagine if they actually created a module for "System Properties" or hide the "Knowledge UI 16 experience". I digress, <insert the other pain points while I wait for an internal hackathon from SN to move some old skeletons>  🙂 

David Dietrich1
Mega Guru

AT LAST!

Larissa5
Tera Contributor

Great news!! 
I don’t know how many times I had to count line numbers at the weekend thinking “where are the line numbers!!” 😂

 

Andreas R_nning
Tera Contributor

Real talk, I'm of course happy about this but it's been kind of maddening how long this has taken. I'm still not entirely ready to sunset my ScriptBox project since it still has some QOL features like inline script result logging, MID scripts and Powershell I don't think I want to go without, but this at least lets me stop relying on the snutils version for the basic stuff.

 

https://developer.servicenow.com/connect.do#!/share/contents/8898486_scriptbox1?v=1.98&t=PRODUCT_DET...

 

Sidenote, it's been almost completely impossible to gain any traction on share projects. People either don't care or don't comment or don't use or don't anything for whatever reason. The fact that no share projects appear to be Googleable feels like a definite part of it. I don't regret pouring the effort into this project because it made my workdays liveable and I could directly help coworkers, but it's felt like dumping work down the privvy in terms of contributing to the larger community over all.

 

Rant over. Here's to more native, properly supported procode developer tools. Let's keep it up!

kali b
Tera Explorer

Hi Chuck, 


I have one doubt regarding background script -
what is the use of Instance Scripts under Run Script button. I think it is also there in the older one with name as customer - no scripts. (adding both images for ref).

Thank You.
Screenshot 2024-02-15 180120.pngScreenshot 2024-02-15 180138.png

 

Papai Ghosh
Tera Contributor

That was really need as a developer.Thanks chuck and servicenow team.

elvinton
Tera Contributor

É muito legal que as ferramentas estão melhorando.

Tenho certeza de que farei bom uso dos scripts.