ES6 Features to Adopt in SuiteScript 2.1

“let” keyword: This is basically a super local variable, it’s very useful for using them in for loops. Now you can have multiple nested for loops and declare all of your loop counter variables “i” and not worry about conflicts. Example Using var: var i = 5; for (var i = 0; i < 10; i++) {   // after last loop… Continue reading ES6 Features to Adopt in SuiteScript 2.1

Update Inventory Detail in SuiteScript

Update an Inventory Detail subrecord on an existing transaction through SuiteScript. When updating the Inventory Detail using client scripts, the method setCurrentSublistSubrecord throws the error: “NOT_SUPPORTED_ON_CURRENT_SUBRECORD”. Setting Subrecord values is currently not supported in client scripts since the subrecord object in this context is only available in view-mode. The solution is to update the Inventory… Continue reading Update Inventory Detail in SuiteScript

Workflow Action Script is not triggered from User Event Script

Scenario : If the workflow action script is triggering when you create the custom record from the web but not when creating it from the user event script triggered by the creation of a sales order, there may be several reasons why this is happening. Here are a few possible causes: Timing issue: When a… Continue reading Workflow Action Script is not triggered from User Event Script

Error : SSS_MAXIMUM_NUMBER_RECIPIENTS_EXCEEDED

A user receives the error: SSS_MAXIMUM_NUMBER_RECIPIENTS_EXCEEDED This error is returned when the “notifySenderOnBounce” is set to True when using Communication APIs and the total number of recipients (recipient + cc + bcc) exceeds 10. To work around the error, the user can get the count for the recipients first. Then, if the count is greater than 10,… Continue reading Error : SSS_MAXIMUM_NUMBER_RECIPIENTS_EXCEEDED

Set Field Value from Suitelet Popup Called from Client Script

A client side script on a transaction record calls a popup Suitelet that lets you search and select an item. After selecting the item from the Suitelet, it should then set the item to the line item of the transaction record. You may use the javascript method window.opener to set value from the suitelet to… Continue reading Set Field Value from Suitelet Popup Called from Client Script

Set the Order Status to Closed for Orders in Received Status

When Transfer Order is in ‘Received’ status, the Close Order button still appears on the record as even though the transaction is completed there are still open items on the order, but when the button is pressed, nothing will happen since for NetSuite it appears that the transaction is already completed.  The Close Order button removed for Transfer Orders which are in ‘Received’… Continue reading Set the Order Status to Closed for Orders in Received Status