SuiteScript – Read Dynamic Sublist Data

Many times, we want to get dynamic information from the user but we do not want an underlying record structure.  In this case, we need sublist data.   What we learned is that in SuiteScript 2.0, the scriptContext object supplied in a BeforeSubmit operation is carrying along the dynamic data submitted by the user; however… Continue reading SuiteScript – Read Dynamic Sublist Data

ES6+ Features to Adopt in SuiteScript 2.1

SuiteScript version 2.1 is out of beta and beginning on the 2021.1 release, all SuiteScript 2.x scripts will be running as SuiteScript 2.1 by default, so you had better test your existing scripts for any bugs or declare them as v2.0 and wait until a later time to validate. To change your scripts to use SuiteScript v2.1… Continue reading ES6+ Features to Adopt in SuiteScript 2.1

Automatically Load Specific NetSuite Forms via SuiteScript

NetSuite Server Side SuiteScript (2.1) to Automatically Redirect and Load Form The following script illustrates the general pattern to redirect to a specific form. In the pattern below, the logic is hard coded for customer records to load form 108. const beforeLoad = (scriptContext) => { var logTitle = “beforeLoad ” + scriptContext.type + “… Continue reading Automatically Load Specific NetSuite Forms via SuiteScript

Dynamically Execute a Form Button using NetSuite SuiteScript 2.0

Sample SuiteScript 2.0 code to Dynamically Create Button to Fire Two SuiteLets In the code example below, using SuiteScript 2.0 it is relatively easy to see how you can hook up a button to fire not one, but two SuiteLets.  The first Suitelet does not have a user interface and performs work server side.  The… Continue reading Dynamically Execute a Form Button using NetSuite SuiteScript 2.0

SUITESCRIPT EXAMPLE – SENDING EMAIL TO MULTIPLE RECIPIENTS

The N/email.send() method supports multiple recipients as well as CC and BCC functionality: MULTIPLE RECIPIENTS The recipients property supports a single internal ID or a single email address string to send to one person, or an Array of those to send to multiple people. Here we have an Array containing two email addresses, thus our t line on the email will… Continue reading SUITESCRIPT EXAMPLE – SENDING EMAIL TO MULTIPLE RECIPIENTS

SuiteScript 2.0 manually add items to communications tab

Add email manually to the communications tab of a transaction The messages sublist is not editable or dynamic, so you do not add items to it directly. Instead you add to it by sending an email via the N/email.send() API and providing the relevant transaction as a Related Record in the options.