How to sort the item lines based on any specific column in the advance PDF template?

In Advanced PDF/HTML templates, item lines normally appear in the same order as they do in the item sublist. However, by using FreeMarker, we have the option to sort the item lines based on any specific column from the sublist. Sample code: This sorts the item lines based on the location. <#list record.item?sort_by(“location”) as item>… Continue reading How to sort the item lines based on any specific column in the advance PDF template?

Store Form with Record for item and Entity records

When working with item and entity records, NetSuite automatically switches the record to the preferred form, even if you initially create it using another form. However, if you need the record to retain a specific non-preferred form, you can use the “Store Form with Record” checkbox available on the form. When this box is checked… Continue reading Store Form with Record for item and Entity records

How to Hide Subtabs Inside a NetSuite Record using suiteScript?

We can use an inline HTML field and jQuery to hide the subtab using a user event script. Sample code: It hides the communication subtab for specific roles /**  * @NApiVersion 2.1  * @NScriptType UserEventScript  */ define([‘N/ui/serverWidget’, ‘N/runtime’],     /**  * @param{serverWidget} serverWidget  */     (serverWidget, runtime) => {        … Continue reading How to Hide Subtabs Inside a NetSuite Record using suiteScript?

How to resolve SUITESCRIPT_API_UNAVAILABLE_IN_DEFINE error

This error typically appears when a new SuiteScript record is created in NetSuite. It happens because module APIs are being used directly inside define and not inside any functions. For example: To fix this, make sure all module functions and enums are placed strictly inside functions. For example: Note: NetSuite performs this validation only when… Continue reading How to resolve SUITESCRIPT_API_UNAVAILABLE_IN_DEFINE error

Strict GS1-128 compliance barcode in Advance PDF Template

In the NetSuite advanced PDF template, barcode type GS1-128 is not supported in the <barcode> tag. However, we can usually achieve it by setting the codetype “code128” and setting the value according to the GS1-128 format. But if the GS1-128 barcode we need to create needs a Group separator, we wouldn’t be able to create… Continue reading Strict GS1-128 compliance barcode in Advance PDF Template

Barcodes in Advanced PDF Templates

In the Advanced Template Editor, edit the HTML markup source and use the BFO tag <barcode /> to create a custom bar code. To add a custom bar code to an advanced template: Open the advanced template in the template editor and click the Source Code toggle. Scroll down to the portion of the HTML markup source… Continue reading Barcodes in Advanced PDF Templates

SOAP Webservice Request-Level Preferences

Some SOAP web services preferences can be set at the request level. Request-level preferences override company-wide settings. In this way, the user sending the SOAP request can control these preferences externally and override the company-level SOAP preferences. The available preferences are: disableMandatoryCustomFieldValidation disableSystemNotesForCustomFields ignoreReadOnlyFields runServerSuiteScriptAndWorkflowTriggers warningAsError bodyFieldsOnly pageSize returnSearchColumns disableMandatoryCustomFieldValidation This preference impacts mandatory custom… Continue reading SOAP Webservice Request-Level Preferences

Suitescript is not triggering when the record is created or updated through SOAP Webservice

There are several possible reasons why a SuiteScript may not trigger when a record is created or updated in NetSuite through a SOAP request. To ensure that the script runs properly in the SOAP web service context, verify the following points: The script is in Released status and configured to Execute as Administrator. The script… Continue reading Suitescript is not triggering when the record is created or updated through SOAP Webservice

Use case of unchecking the Store Value checkbox during the custom field creation

 What is the Store Value checkbox? By default, the Store Value option is enabled so that custom field values are stored in your NetSuite account. If you don’t want any changes entered stored in the custom field, clear the Store Value box. Not storing the value enables you to look at data that’s stored elsewhere. If you don’t store… Continue reading Use case of unchecking the Store Value checkbox during the custom field creation

Importance of the defaultValue in the record.create

When you create records of certain types, you can use the defaultValues parameter to provide default values for fields in the new record. For some record types, some default values are required. For example, when you create a script deployment record, you must provide the internal ID of an existing script in your account (to associate with… Continue reading Importance of the defaultValue in the record.create