TypeError: Cannot read property “custbody_field” of null

To find the NetSuite script that is causing the error, follow these steps: Go to Customization > Scripting > Scripted Records. Edit the record that you’re trying to troubleshoot, say for example, “Sales Order”. Look at the list of scripts deployed on the record defined by the “Deployed” checkbox. Uncheck all the scripts under “User Event Scripts” or… Continue reading TypeError: Cannot read property “custbody_field” of null

Use Client script to get vendor bill id when vendor payment record is loaded.

Requirement is to get value of vendor bill id when vendor payment record is loaded. /** * @NApiVersion 2.x * @NScriptType ClientScript * @NModuleScope SameAccount */define([‘N/currentRecord’, ‘N/record’, ‘N/url’], /** * @param{currentRecord} currentRecord * @param{record} record * @param{url} url */ function (currentRecord, record, url) { /** * Function to be executed after page is initialized. *… Continue reading Use Client script to get vendor bill id when vendor payment record is loaded.

Remove Standard Leave Site Popup in Suitelet forms

Jira Code : 552 Description The custom form created using Suitelet script will show the Standard Leave Site Popups while we navigate away. We can also remove this popup by using the following code. We can add the following code in the page Init entry point of the Client script which is associated with the… Continue reading Remove Standard Leave Site Popup in Suitelet forms

Create pop up Window at sales order entry

Requirement Create a pop up window on sales order Entry that says “Customer with Over Due Balance” if the customer has overdue balance no empty and greater than 0 and if the days overdue are greater than 0. The window should not prevent to enter the sales order, only informative. Solution The The pop up… Continue reading Create pop up Window at sales order entry

Display a soft warning pop up for negative stock

Requirement We need to introduce a soft warning pop-up when users attempt to Save an Inventory Transfer which will result in Negative Stock being recorded at the From Location. The criteria for triggering this pop-up are: One or more line items have a ‘QTY. ON HAND’ (From Location) value which is LESS THAN then ‘QTY.… Continue reading Display a soft warning pop up for negative stock

Error Messsage on Button Click

Scenario: On button click,a field value need to be validate.If value is not set in the field then error message need to be displayed.And the further button action need to be prevented in Client script. Solution: Use ‘N/ui/message’ module Code snippet: function in client script called on button action: // Defining the function called in… Continue reading Error Messsage on Button Click

Issue : Uncertainty in populating sublist values

Issue As per the requirement, the project task needs to be auto populated in Timesheet only when a project is selected and the project has only one project task. Client script field change was used the in scripts, but found an uncertainty in populating the project tasks. The project tasks populated correctly except in few… Continue reading Issue : Uncertainty in populating sublist values