Writing on NetSuite, software development, Stoicism, and life in general.

All of my long-form thoughts on NetSuite development, understanding Stoicism, amateur photography and anything else.

SuiteScript with a Safety Net

Littering your code with try/catches everywhere can be annoying and ensuring that you have a consistent way check for, handle, and log errors can be difficult. With a simple library, you can ensure consistent error logging throughout your SuiteScript code bae

Using DataGrip with NetSuite

DataGrip is a great application from the team at JetBrains. It allows you to connect to a variety of different databases and data sources including NetSuite when you use the ODBC/JDBC drivers provided by NetSuite.

SuiteScript Function Naming

Naming functions well in our code is often challenging. With no modules to speak of in SuiteScript 1.0, these function often exist in the JavaScript global namespace. This is an easy way to namespace your functions to avoid any naming collisions.

.map() your NetSuite Search Results

When writing SuiteScript, your code will be easier to read if you can use regular JavaScript objects rather than the script IDs for your custom field names. Using the JavaScript .map() function can help.