Date format in FreeMarker Template Language (FTL)

In FreeMarker Template Language (FTL) script, the date format is set as ‘October 1, 2023 – October 31, 2023’, So the client needs to change this date format to ‘01.10.2023 – 31.10.2023’ (DD.MM.YYYY). _startdate: [“2023″,”10″,”01”],_enddate: [“2023″,”10″,”31”], The code for the date format ‘October 1, 2023 – October 31, 2023‘ is given below 2. The code… Continue reading Date format in FreeMarker Template Language (FTL)

Create a custom form and using the details from the form, create a customer record

Overview For this we use script type as Suitelet, which has entry point – onRequest. First, create a custom form which includes the following details – Name, E-mail, Phone, Sales Rep, Subsidiary (and other fields if required). Now, Create a submit button and on clicking the same, It should display the details entered by the… Continue reading Create a custom form and using the details from the form, create a customer record

N/search Module

The N/search module specifically provides functions for searching records in NetSuite. You can use it to create and execute searches on various NetSuite record types. Here are some key components and functions associated with the N/search module: 1. search.create(options): This function is used to create a new search object. You provide an options object that… Continue reading N/search Module

How to apply multiple Replace() functionality in FreeMarker Template Language (FTL)

Scenario: In our PDF template, the user needs to replace the company address with the following changes If the company address contains a comma, then replace it with empty that is, Replace the ‘,’ with ‘ ‘. If in the company address, the country name is ‘United States’, then replace it with ‘Deutschland’ Use the… Continue reading How to apply multiple Replace() functionality in FreeMarker Template Language (FTL)

How to get the old record value in client script

Here, we have used lineInit() to get the value. declare the variable as global; itemQuantity = currentRecord.getCurrentSublistValue({                    sublistId: ‘item’,                    fieldId: ‘quantity’                }); Then use the value where we need.  currentRec.setCurrentSublistValue({ … Continue reading How to get the old record value in client script