31 May Converting Netsuite Scripts from Suitescript 1.0 to 2.0
We have recently been busy converting netsuite scripts and have converted quite a few of our modules from SuiteScript 1.0 to SuiteScript 2.0. and continue to do so. If you haven’t had a play with suitescript 2.0, I definitely recommend getting into it as soon as possible.
Some of the advantages we have found so far are:
- Easier to use custom modules than attaching script library files to script records (or plugins for that matter).
- Easier to read code
- Easier for non-Netsuite programmers to pick up
- No more nlapi calls to wrap for testing purposes
So in this article I’ll concentrate on the above issues, that prompted us into converting netsuite scripts, so that you can understand our point of view on this process and the benefits of it. There are also a couple of projects that we haven’t started as yet, because they are massive, and in subsequent articles, we’ll look at why we haven’t started those as yet.
Modules make it easier and faster.
Probably the main advantage for us is moving our Netsuite hosted integration platform onto Suitescript 2.0. The challenge in SuiteScript 1.0 was always about how to enable a base implementation, and then extend that as different customers had different requirements. We tried all sorts of things including Netsuite Custom Plugins, and the solutions were always difficult to explain to anyone new, and, because everything was loaded at the beginning, of any process, always really heavy on the performance side. So suitescript to allowed use standard OO programming conventions, and create separate modules to be loaded as required. Just as important, it enforced a consistent file structure across the modules.
Easier to read, and easier for non-Netsuite programmers to pickup
No more nlapi calls to wrap for testing
So I’ll explain a little more here about one of the things that we did here to assist our automated system testing, which reduced our development time, and also improved our testing. As the nlapi calls made it extremely difficult to do any system testing, we invested a lot of time in building a robust Data Abstraction Layer (DAL) that wrapped a lot of the Netsuite api’s that we used in Server Side development. So whilst we still use this for two of our major products, it’s future is limited because new functionality will only be released in SuiteScript 2, and also because some of the functionality has been addressed in SuiteScript, for example making all the indices of lines and search results consistent.
Suitescript 2.0 is in no doubt a huge leap ahead of SuiteScript 1.0. There are of course gotchas and things to look out for, but overall, we highly recommend moving what you’ve got over.
If you can see a need for the converting netsuite scripts in your business, we would love to chat to you. In fact, if you have a conversion requirement for NetSuite or any specific integration requirements for your business and NetSuite contact us today and find out how we can make your life simpler and help you work smarter.