Custom GL Lines Plug-in in NetSuite

The Custom GL Lines Plug-in is a powerful tool used to modify the general ledger (GL) impact of standard and custom transactions in NetSuite. It is designed to help businesses comply with various global accounting standards by enabling the creation of custom transaction logic that can add or modify GL lines. Key Features of the… Continue reading Custom GL Lines Plug-in in NetSuite

Formatting Weight Range : Adjusting decimal places in strings

This section focuses on formatting the weight range (e.g., “10 – 20 lbs”) into a more readable format with one decimal place. Assign Original String: The weight range string is stored in the dimension_range variable. <#assign dimension_range = itemLineDetails.weightrange /> Extract Numeric and Unit Parts: The numeric part of the weight range is separated from… Continue reading Formatting Weight Range : Adjusting decimal places in strings

Formatting Strings

This section of the FreeMarker template is responsible for processing and formatting item dimensions (length, width, height) to three decimal places. The input string: 5″ x 4″ x 2″ Assign Original String: The dimensions of the item are stored in the dimensions variable. <#assign dimensions = itemLineDetails.dimensions /> Remove Double Quotes: To facilitate easier processing,… Continue reading Formatting Strings

Handling Virtual Sublist Display in SuiteScript 2.x

In this article, we’ll explore the creation and manipulation of virtual sublists in NetSuite using the SuiteScript 2.x API. Specifically, it will focus on the part of the script where the sublist is created and populated with values. Introduction: Overview of virtual sublists and why they are useful. Creating a Sublist: How to create a… Continue reading Handling Virtual Sublist Display in SuiteScript 2.x

formatDate Function – Formatting Dates in NetSuite

This article will focus on the formatDate function, its purpose, and how it converts dates into a specific format. The function accepts a date string in the format “DD-MONTH-YYYY” (e.g., “15-JANUARY-2024”) and converts it to “MM/DD/YYYY” (e.g., “01/15/2024”). Here’s what the article could include: Introduction: Explaining the importance of date formatting in NetSuite scripts. Code… Continue reading formatDate Function – Formatting Dates in NetSuite

Restricting Editing of Sales Orders in Customer Center

In certain scenarios, it is essential to prevent users from editing Sales Orders (SO) when specific conditions are met, such as when a pick task is associated with the order. This ensures the integrity of the order fulfillment process, particularly when integrated with third-party applications like RF Smart. Implementation Steps: Open Orders Search Feature: A… Continue reading Restricting Editing of Sales Orders in Customer Center

Getting Current User Details Without Accessing the Employee Record in NetSuite

When developing custom client scripts in NetSuite, there are situations where you need to access details about the current user, such as their location. However, directly querying the employee record can lead to permission issues, especially if the user’s role doesn’t have access to view employee records. To address this issue, you can use the… Continue reading Getting Current User Details Without Accessing the Employee Record in NetSuite

Designing a Full-Page Fixed-Height Item Table in Advanced PDF Using XML Freemarker Template.

In business document layouts, such as invoices or order summaries, it’s essential to maintain a consistent and professional appearance regardless of the number of items listed. One common requirement is to have the item table fill the entire page, even if only a few items are present. This ensures a uniform look and prevents awkward… Continue reading Designing a Full-Page Fixed-Height Item Table in Advanced PDF Using XML Freemarker Template.

Advanced PDF Template for Customer Statements: Calculating Date Differences for Invoice Aging

This FreeMarker script is designed to categorize overdue invoices on a customer statement by calculating the number of days between the invoice due date and the statement date. Here’s a concise breakdown of the process: Extract and Convert Dates: The script retrieves the due date (line.duedate) and statement date (statement.trandate), converting them into strings. Check… Continue reading Advanced PDF Template for Customer Statements: Calculating Date Differences for Invoice Aging

How to create and RSA sign a JWT in NetSuite to consume an external OAuth2 service

When connecting to external oAuth2 services, one typically needs to generate and sign a JWT (JSON Web Token). This JWT then becomes part of an HTTP request to an external endpoint, aiming to secure an access token for subsequent interactions. While JWTs can be symmetrically or asymmetrically signed, this article will focus on using RSA… Continue reading How to create and RSA sign a JWT in NetSuite to consume an external OAuth2 service