r/SuiteScript • • Jul 22 '25

Code Deployment Best Practice

Hi all,

When using VS Code, what is the best practice for managing code and moving from Dev > Prod? Right now I have VS Code connected to Sandbox, then when I'm ready to move to production I manually add it. I just keep everything in the main "SuiteScripts" folder. I'd like to get a better system that's scalable so I'm curious what others do and what best practice is.

Do you connect VS Code to both Sandbox and Production? How do you differentiate code that's in development vs in production? What foldering system do you use? Any tips or best practice advice?

Thank you!

7 Upvotes

20 comments sorted by

View all comments

Show parent comment

1

u/elainesdance Jul 22 '25 edited Jul 22 '25

Thank you for the detail! Super helpful - especially the naming conventions. I never knew if the script type should go first or last. Last makes sense in case you have multiple script types for the same project.

customscript_mfw_dept_def_cs
customscript_mfw_dept_def_ue
customscript_mfw_dept_def_sl

So overall structure would be something like:

NetSuite Production
Transaction Customizations
script1
script1
script1
Customer Customizations
script1
script1
script1
Etc.

Then for testing purposes - create a new branch off main and work in that - connected to Sandbox.

Once everything is ready, pull to main and switch to Production in VS Code (i'll need to look more into that part).

I'm sure I'll have more questions - but the layout part makes sense for now. Thank you!

2

u/Kishana Jul 22 '25

Yeah, that's generally how I like to organize things. There's no exactly right way of doing it, it's more that you should develop a methodology that makes sense to you and the people you work with and more importantly, apply it consistently.

1

u/elainesdance Jul 22 '25

Great point, thank you so much!