How do you keep track of scripts you have written?

richelle_pivec
Mega Guru

So far I've had the "fly by the seat of my pants" approach to keeping track of scripts I've written and solutions I've come up with. Since I can barely remember what I did last week let alone last month, I feel like there has to be a better way to catalog these solutions so I can easily access them again.

So, what do you do? Just leave it in ServiceNow and rely on your memory to hunt it down or do you have some other method?

thanks,

Richelle

1 ACCEPTED SOLUTION

Dominik Simunek
Tera Guru

Hi Richelle,



I use sn-filesync - GitHub - dynamicdan/sn-filesync: 2-way sync ServiceNow field values to local files  


It allows me to write the code in my favorite editor and have it synced to ServiceNow from my local files. Benefit is that it structures all the files into folders based on the type of script etc. At the end I have a structure based on instance / project and then based on type of scripts. I can then easily try to search for my scripts and my solutions within those folders.



Give it a try .


Regards,


Dominik


View solution in original post

6 REPLIES 6

Yes, I would really recommend it. It allows me also all the time to validate my code by ESLint as I can write it locally in my editor, having the ESLint specifically configured for ServiceNow scripts validating not only common mistakes but also coding style and formatting. The JSLint in ServiceNow script editor does not check for many things.


To keep this thread a bit more up-to-date I want to add that as of New York release, there is a way how you can configure ESLint rules directly in the ServiceNow platform.

https://developer.servicenow.com/blog.do?p=/post/ny-studio-features/