Framework is a unopinionated, batteries-included framework for writing
Netsuite SuiteScripts 2.x code. Framework is a fork of
exploreconsulting/netsuite-fasttrack-toolkit-ss2 which has now been
made private due to independence considerations at RSM.
Framework includes the following features:
N/record. Say goodbye to record.getValue/Text, and say hello to
salesOrder.entity and salesOrder.entityText! If you haven't been using
it, you owe it to yourself to learn how it works.N/log module that allows you to
log the entry/exit functions of a namespace automatically.N/search and N/query.N/runtime.The framework offers a TypeScript supercharged Netsuite SuiteScript 2.x
experience. The core of the framework enhances working with N/record,
N/search, and N/query.
The data access layer makes working with SuiteScript 2.x N/record a
breeze by allowing a record to be represented by a standard TypeScript
class.
class SalesOrder extends SalesOrderBase {
// Custom field not part of the standard Netsuite record
@FieldType.freeformtext
custbody_notes: string;
}
const order = new SalesOrder(1234);
log.debug("Notes", order.custbody_notes);
for (const line of order.item) {
log.debug("Line:", `${line.item} ${line.rate} ${line.quantity}`);
}
node_modules we will revisit this approach. You will need to update
your build command to copy framework/thirdparty to your dist folder.DataAccess/BaseRecordsDataAccess/FieldDescriptors. For now we export this from
Record.ts/Sublist.ts. We may mark these as deprecated in the
future.thirdparty.
thirdparty/core has libraries required for Framework functionality.
All other tools have been moved to thirdparty/optional.NS-Tools/Framework plans to offer two ways to use this project. The first method is cloning it as a submodule into your current project. This method is currently available to use.
The second way is using the starter template to quickly get your project off the ground! This is a work in progress, and is not quite ready for prime time, but watch this space for details.
To install, navigate to your source directory, and run the command git submodule add -b production --depth 1 git@github.com:ns-tools/framework.git from the directory you want
framework to clone the subfolder into. You'll need to update your build
process to copy framework/thirdparty to your dist folder since tsc
does not copy js files.
For example, if you project lives under src you would run cd src and
then the git submodule command.
To update, run the command git submodule update --remote --merge to
pull in the latest changes to Framework.
npm build (or yarn build or bun build... etc.).dist/js folder to your file cabinet.dist/declarations files to your project mirroring the same
access path in your file cabinet.You can pin a specific version of Framework by using commands similar to these. Note replace {version} with the version number. You can find a list of releases by running git tag --list.
NS Tools Framework includes the following third party frameworks for core functionality.
Logger functionality.Logger functionality.We offer the following optional packages.
Framework is licensed under the MIT license. You are free to use it in your projects free of charge, but without any warranties, express or implied. If you have questions, read the license. If you have more questions, talk to your attorney.
The original project license is/was MIT based on the project.json license grant, speaking with Shawn Talbert, and issue #4 under the original repository. There are several forks of the original repository available on GitHub that also show that the project was released under the MIT License.