Create a User Event Script to Print Child Custom Record Entries or other Child Subrecord within Advanced PDF/HTML Templates

Scenario Currently there is no possibility to directly include child Custom Record entries in the printouts utilizing Advanced PDF/HTML Templates. This is being tracked under Enhancement 304767.  As an alternate solution it is possible to create a beforeLoad User Event Script that will search over the custom subrecord entries and get the results into a custom… Continue reading Create a User Event Script to Print Child Custom Record Entries or other Child Subrecord within Advanced PDF/HTML Templates

Attach emails in required subtabs

email.send(options) options.relatedRecords – Object that contains key-value pairs to associate (attach) the Message record with related records (that is, transaction, activity, entity, and custom records). Represents the NetSuite records to which an email Message record should be attached. You can associate the sent email with the following records listed below. You cannot use custom record,… Continue reading Attach emails in required subtabs

Configuring Maximum Entries in Dropdown Lists in NetSuite for Mobile

The number of entries in a list of options determines which type of selector NetSuite displays: popup selector or roll selector. You can configure this from a browser by setting the Maximum Entries in Dropdowns preference. To set the Maximum Entries in Dropdown preference: Log in to NetSuite from a browser session, and then go… Continue reading Configuring Maximum Entries in Dropdown Lists in NetSuite for Mobile

Display Preferred Bin in the Advanced PDF Template for Picking Ticket PDF

By using ${item.inventorydetail}, it is possible to display the preferred bin number in the advanced PDF template for Sales Orders. Bin Numbers on Picking Tickets If you use a bin management feature, bin numbers are automatically printed on picking tickets for orders with items associated with bins. The preferred bin number for an item is… Continue reading Display Preferred Bin in the Advanced PDF Template for Picking Ticket PDF

Change orientation of the camera is based on the device’s orientation.

async function startCamera() {     try {         // Stop the previous stream if it exists         if (videoStream) {             const tracks = videoStream.getTracks();             tracks.forEach(track => track.stop());         }        … Continue reading Change orientation of the camera is based on the device’s orientation.

The Importance of USEREVENT Context in SuiteScript

The USEREVENT context in SuiteScript is crucial for handling backend processes triggered by user actions, such as button clicks or record submissions. Unlike the USER_INTERFACE context, USEREVENT allows scripts to run automatically in response to various events, ensuring data processing and validation are consistently applied. Using the USEREVENT context ensures your scripts handle essential backend… Continue reading The Importance of USEREVENT Context in SuiteScript

KPI Portlet Script Sample

/**  * @NApiVersion 2.x  * @NScriptType Portlet  */ define([‘N/search’, ‘N/format’], function(search, format) {     function render(params) {         var portlet = params.portlet;         portlet.title = ‘Key Performance Indicators’;         var totalSales = 0;         var totalCustomers = 0;        … Continue reading KPI Portlet Script Sample

Freemarker Decimal Truncation

<#– Initialize the formatted dimensions string –> <#assign formatted_dimensions = “” /> <#– Function to truncate the decimal part to a maximum of 3 places without rounding –> <#function truncateTo3DecimalPlaces number>     <#– Convert the number to a string without rounding and split at the decimal point –>     <#assign numberString = number?string(“0.0################”)… Continue reading Freemarker Decimal Truncation