Number to words for USD

    function numberToWords(num) {         const units = [‘Zero’, ‘One’, ‘Two’, ‘Three’, ‘Four’, ‘Five’, ‘Six’, ‘Seven’, ‘Eight’, ‘Nine’];         const teens = [‘Ten’, ‘Eleven’, ‘Twelve’, ‘Thirteen’, ‘Fourteen’, ‘Fifteen’, ‘Sixteen’, ‘Seventeen’, ‘Eighteen’, ‘Nineteen’];         const tens = [‘Twenty’, ‘Thirty’, ‘Forty’, ‘Fifty’, ‘Sixty’, ‘Seventy’, ‘Eighty’, ‘Ninety’];  … Continue reading Number to words for USD

Use Cases of N/search or N/query

Choosing the Right Module: Use N/query When:   Advanced SQL-like queries are required.   Complex data relationships and aggregations are essential.   Users are comfortable with SQL syntax.   Multi-join scenarios are integral to the data retrieval process. Use N/search When:   Quick and easy data retrieval is a priority.   A user-friendly interface is preferred.   Saved searches for recurring tasks… Continue reading Use Cases of N/search or N/query

Details of Customers having Overdue greater than 10 days using N/query

/**  * @NApiVersion 2.1  * @NScriptType UserEventScript  */ define([‘N/query’],     /**  * @param{query} query  */     (query) => {         /**          * Defines the function definition that is executed before record is loaded.          * @param {Object} scriptContext          *… Continue reading Details of Customers having Overdue greater than 10 days using N/query

Enhancing Purchase Orders: Storing Child Records for Sublist Display using Suitelet

Create a child record for the standard record which is the purchase order. Make all the fields to be show in list. Custom Field Display should be normal. Here is the child record and the purchase order connects with the corresponding purchase order. Suitelet Code: /**  * @NApiVersion 2.1  * @NScriptType Suitelet  */ /**************************************************  *… Continue reading Enhancing Purchase Orders: Storing Child Records for Sublist Display using Suitelet

Creating Multi-Currency Functionality with SuiteScript

As businesses expand globally, managing multi-currency transactions becomes crucial for accurate financial reporting and efficient operations. NetSuite’s SuiteScript provides a powerful toolset for implementing multi-currency functionality. This article will guide you through the process of creating and managing multi-currency features in NetSuite using SuiteScript. Understanding Multi-Currency in NetSuite NetSuite’s multi-currency feature allows companies to conduct… Continue reading Creating Multi-Currency Functionality with SuiteScript

SuiteScript Error Codes: A Comprehensive Reference

SuiteScript, the JavaScript-based API for NetSuite, allows developers to customize and automate various business processes. While it offers robust functionalities, errors can occur during script execution, and understanding these error codes is essential for efficient debugging and troubleshooting. This article provides a comprehensive reference to SuiteScript error codes, their meanings, and suggested solutions. Common SuiteScript… Continue reading SuiteScript Error Codes: A Comprehensive Reference

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

Fetch exchange rate using API request from the response object

The following code will teach you to call and request information from the endpoint This is another way of getting a value from API request.  let headersRequest = {                         ‘Content-Type’: ‘application/json’                     }  … Continue reading Fetch exchange rate using API request from the response object

RESTful and SOAP web service

RESTful and SOAP are two different web service protocols used for communication between systems over the internet. Here’s a brief overview of each: RESTful Web Services REST (Representational State Transfer) is an architectural style rather than a protocol. It’s widely used for web services that provide interoperability between computer systems on the internet. Key Characteristics:… Continue reading RESTful and SOAP web service