How to Make a NetSuite Sublist Field Read-Only Using jQuery (LIST Type)

In NetSuite, when using a LIST-type sublist in a Suitelet, setting a field as disabled prevents updates even from scripts like setSublistValue. However, there are cases where you want a field to appear read-only to the user but still update it via script. Here’s a simple JavaScript function that makes a specific sublist field read-only… Continue reading How to Make a NetSuite Sublist Field Read-Only Using jQuery (LIST Type)

Advanced SuiteScript Techniques for Performance Optimization

Understanding how to optimize SuiteScript performance is crucial for ensuring that custom scripts run efficiently, especially in environments with large datasets. Performance issues can lead to timeouts, slow user experiences, and increased operational costs. Here are several advanced techniques to enhance SuiteScript performance. Use of Asynchronous Processing: When dealing with large data sets, consider using… Continue reading Advanced SuiteScript Techniques for Performance Optimization

Calling a backend suitelet from a suitelet to handle exceeding of governance limit

A backend suitelet is called from main suitelet to handle exceeding of governance limit. Main suitelet let postData = {               labelCounterValue: labelChunks[i].length,               label: label,               printString: printString[i],               labelChunkLength:… Continue reading Calling a backend suitelet from a suitelet to handle exceeding of governance limit

How to Use Suitelet for Inventory Adjustment in NetSuite

NetSuite’s Suitelet functionality is a powerful tool for creating custom user interfaces and workflows. When used for inventory adjustment, Suitelets provide a seamless way to manage stock updates and ensure accurate inventory tracking. Here’s a step-by-step guide on how to use a Suitelet for inventory adjustment: Step 1: Define the Suitelet Script The Suitelet script… Continue reading How to Use Suitelet for Inventory Adjustment in NetSuite

Add a Secret Key Field in Suitelet Form

The following sample shows how to add a secret key field.      /**  * @NApiVersion 2.x  * @NScriptType Suitelet  */ define([‘N/ui/serverWidget’, ‘N/file’, ‘N/keyControl’, ‘N/runtime’], function(serverWidget, file, keyControl, runtime) {   function onRequest(context) {     var request = context.request;     var response = context.response;     if (request.method === ‘GET’) {       var form = serverWidget.createForm({         title: ‘Enter Password’       });       var credField =… Continue reading Add a Secret Key Field in Suitelet Form

How Suitelet Scripts are Executed

The following steps and diagram provide an overview of the Suitelet execution process: Client initiates an HTTP GET or POST request (typically from a browser) for a system-generated URL. A web request object contains the data from the client’s request. See N/http Module. The user’s script is invoked, which gives the user access to the entire Server SuiteScript API as… Continue reading How Suitelet Scripts are Executed

Changes to the url.resolveScript(options) SuiteScript method

What is changing? As of September 30, 2024, the return of external URLs with url.resolveScript(options) will be allowed only for authenticated sessions. Scripts that use url.resolveScript(options) with the returnExternalUrl parameter set to true will no longer work in untrusted contexts. To avoid errors, you must review scripts that use the url.resolveScript(options) method with the returnExternalUrl parameter set to true and ensure that this setting is used only in a trusted… Continue reading Changes to the url.resolveScript(options) SuiteScript method

Merging Email Templates and Sending Approval Emails in NetSuite

Introduction: Merging email templates with dynamic content and sending approval emails are key steps in automating approval workflows in NetSuite. This article covers the merging process and email sending functionality. Key Script: const sendEmail = {         sendEmail(recordId, itemName) {             try {        … Continue reading Merging Email Templates and Sending Approval Emails in NetSuite

Generating Dynamic URLs for Approval Processes in NetSuite

Introduction: Creating dynamic URLs for approval processes is crucial in automating workflows in NetSuite. This article discusses generating external and record URLs to streamline item approval processes. const sendEmail = {         sendEmail(recordId, itemName) {             try {                 const… Continue reading Generating Dynamic URLs for Approval Processes in NetSuite

Interact with Backend Suitelet

In Netsuite Customization Client script executes in the logged-in user’s role. This can create errors while trying to access records for which the logged-in user doesn’t have the required permission. The solution is to call a backend suitelet from the client script. We suggest  If you need to use that value in the client script for setting… Continue reading Interact with Backend Suitelet