Use the runtime module if you want to view runtime settings for the script, the session, or the user. This returns the internal ID of the role for the current user. The supported script types are Client and server scripts.
Author: Sruthi Surendran
Calculate Date Difference in Saved Search if one of the Date is empty
Have been using the formula numeric to compare two dates in NetSuite via saved search. This was required in purchase order update sync.This formula is used to check whether there are any latest updates on the purchase order. After the PO update sync we will set the updated date on custom date field. The formula… Continue reading Calculate Date Difference in Saved Search if one of the Date is empty
Print packing slip from a custom button to show Expiration date from inventory details
The requirement is to show the expiration date from inventory details in the packing slip. As there is no standard option to fetch the expiration date to print template, we have used the custom button to print packing slip. via script we can get the inventory detail subrecord fields.
Why a given date turns into a day before when using new Date()
The given date is 2022-12-28. That’s suppose to be Dec. 28, 2022. But when I use new Date(), it returns as Tue Dec 27 2022 16:00:00 GMT-0800 (PST) and not Wed Dec 28…. Solution
Exchange rate between two currencies via suitscript
Method used to return the exchange rate between two currencies based on a certain date. The Currency Exchange Rate record itself is not a scriptable record. Use the module N/currency. Only base currencies can be converted. The target must be a base currency in your NetSuite account. If the date is not given the latest… Continue reading Exchange rate between two currencies via suitscript
Add button to send payment voucher to vendor from bill payment
Requirement Add a button (labelled “Send email “) in the Bill payment record. On the button click the Payment Voucher should be emailed to the supplier. The recipient email address can be taken from the supplier record. The payment voucher is the print template in Bill payment. Solution Button created on bill payment record. on… Continue reading Add button to send payment voucher to vendor from bill payment
‘Delivery Confirmation’ and ‘Signature Required’ on item fulfillment record when FedEx integrated shipping items are used.
There was a requirement to set the “Signature required” as a default value in delivery confirmation field inFedex integrated shippping. As we trying to set it via UI , after the save of IF record the value set back to NONE SELECTED. As we cannot set it through UI we cannot set this via script… Continue reading ‘Delivery Confirmation’ and ‘Signature Required’ on item fulfillment record when FedEx integrated shipping items are used.
Add Expected Ship Date Column to Custom Sales Back Order Report
User having an issue when adding Expected Ship Date column to track open orders that needs to be fulfilled on their respective ship dates.Unfortunately the column field do not source the date from orders. As a solution to this User may select the Date Shipped column and show same results for item line level Expected Ship Date from the Sales… Continue reading Add Expected Ship Date Column to Custom Sales Back Order Report
Mass Update of item price level value through Script
Here is setting the “Base Price level” value as zero in the inventory item record. Note : The line number may varies according to the price level list order.
Update Bulk item price on a button click
Requirement : On button click from sales order/estimate we can have a pop up listing all items with a checkbox and a field to enter the price level.When the user selects items and enter the price for it, upon submit, the selected items will get updated with the new price added. Solution 1: Created the… Continue reading Update Bulk item price on a button click