When Multiple Currency feature enabled, users cannot print using a custom Statement form on Standard Statement PDF/HTML Template, which is causing the error “Multi currency customer setting was detected. Please use Multi Currency Advanced Printing Template“. Solution User needs to either use the Standard Statement form or customize their custom Statement form. Use Standard Statement… Continue reading Error when printing customer statement
Category: NS Customization
All articles / code related to Netsuite customization
Customizing Internal IDs for Custom Records in NetSuite.
NetSuite provides a standard feature to customize the starting Internal ID for custom records. In some business requirements, you may need to use a custom internal sequence number starting from a specific number that aligns with your business process. In that case, you can set an initial number in the Initial Number field under the… Continue reading Customizing Internal IDs for Custom Records in NetSuite.
SyntaxError: Unexpected token < in JSON at position 0 [at JSON.parse (native), at VendorBillFormGateway.triggerHttpsPostRequest (/SuiteApps/com.netsuite.vendorinvoicedistribution/app/common/gateways/BaseGateway.js:302:25)] After Installing Transaction Line Distribution (Version 1.2.4)
User encounters an Error: “SyntaxError: Unexpected token < in JSON at position 0 [at JSON.parse (native), at VendorBillFormGateway.triggerHttpsPostRequest (/SuiteApps/com.netsuite.vendorinvoicedistribution/app/common/gateways/BaseGateway.js:302:25)]” when opening a transaction such as Purchase Order or Sales Order. This is a result of Online Form User not being selected as one of the roles in a script deployment. Solution Navigate to Customization > Scripting > Script Deployments Locate Deployment ID customdeploy_vid_sl_vendorbillform Click Edit Click Audience subtab External… Continue reading SyntaxError: Unexpected token < in JSON at position 0 [at JSON.parse (native), at VendorBillFormGateway.triggerHttpsPostRequest (/SuiteApps/com.netsuite.vendorinvoicedistribution/app/common/gateways/BaseGateway.js:302:25)] After Installing Transaction Line Distribution (Version 1.2.4)
Including the customer code and customer name together in the invoice record’s customer field
In the customer record, there will be the customer code and the customer name. While choosing the customer in the invoice record, usually the code will be populated. But this is difficult to understand, so it will be easy to include the name along with this code. For getting this Navigation: Setup>Company>Auto Generated Numbers. Enable… Continue reading Including the customer code and customer name together in the invoice record’s customer field
Exporting CSV from NetSuite Suitelet page with Client Scripts
/** * @NApiVersion 2.x * @NScriptType ClientScript * @NModuleScope SameAccount */ define([‘N/currentRecord’], /** * @param{currentRecord} currentRecord */ function (currentRecord) { const SUBLIST_ID = ‘custpage_report’; /** * Generates and downloads a CSV file containing data from… Continue reading Exporting CSV from NetSuite Suitelet page with Client Scripts
Using NetSuite’s Internal remoteObject.bridgeCall API to Load Dataset Definitions
When working with NetSuite Analytics Datasets (Workbooks), it’s often necessary to retrieve the underlying dataset schema—fields, joins, aggregations, types, and metadata. NetSuite does not expose a public REST API for this; however, its internal client-side API allows you to load dataset definitions using the remoteObject.bridgeCall method. The getDatasetObject() function below demonstrates how to call this… Continue reading Using NetSuite’s Internal remoteObject.bridgeCall API to Load Dataset Definitions
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 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