To find items with the same display name but different manufacturers in a NetSuite saved search, you can use a combination of filters and formulas. Here’s how you can approach it: 1. **Create a Saved Search**: – Navigate to **Lists > Search > Saved Searches > New** and select the **Item** record type. 2. **Set… Continue reading How to find all items with the same MPN but different manufacturers in a saved search?
Month: April 2025
Sample code to get the Mass-update trigger in a user event script
function afterSubmit(scriptContext) { try { log.debug(“context”, scriptContext.type); log.debug(“runtime.executionContext”, runtime.executionContext); if (scriptContext.type === scriptContext.UserEventType.XEDIT) { // XEDIT catches body field edits through mass-update // add code here } } catch(error){ // Add error handling }
How to show hidden fields in mass update field options
If you create a new field and apply it to a record type, it will not be readily visible in the mass update field selection option section. To make sure the field is available, you have to click ‘Save and Apply to Forms’ and mark the checkboxes to show the field in the standard/custom form… Continue reading How to show hidden fields in mass update field options
Field edit contexts not supported in User event script ‘afterSubmit’ entry point
The NetSuite user event script supports record save contexts from many use cases like field edit through UI, script, mass update, inline edit etc The field edit context that is not supported in user event script ‘afterSubmit()’ entry point is the ‘Set Field Action’ through a scheduled workflow. To solve this, you can schedule a… Continue reading Field edit contexts not supported in User event script ‘afterSubmit’ entry point
Best practices for displaying more than four items in single row on the PLP pages
In SCA websites, typically four items are displayed per row on PLP pages. To include more items as per the requirements from clients, we need to resize the item names, images, and the entire item cells. To reduce or restrict the display of lengthy item name we use the ellipsis feature in CSS. Below provided… Continue reading Best practices for displaying more than four items in single row on the PLP pages
How to set default country selection option on the checkout page
Go to Website Setup record. Under ‘Shopping’ tab there is a dropdown field named ‘Default Shipping Country for Checkout’ in the ‘Shipping Page’ section. Select the country that you want to set as default shipping country option during checkout process. If no country has chosen (left the dropdown as empty), then default selected shipping country… Continue reading How to set default country selection option on the checkout page
SuiteQL query to get company contacts
The SuiteQL query below returns all of the contacts associated with a specified company. SELECT Company.ID AS Company, Company.EntityTitle AS CompanyName, CompanyContactRelationship.Contact, BUILTIN.DF( CompanyContactRelationship.Contact ) AS ContactName, CompanyContactRelationship.Role, BUILTIN.DF( CompanyContactRelationship.Role ) AS RoleName FROM Entity AS Company INNER JOIN CompanyContactRelationship ON ( CompanyContactRelationship.Company = Company.ID ) WHERE ( Company.ID = 2707 )
SuiteQL query to get the Customer Deposits
This SuiteQL query below returns all deposits received for a specific customer. SELECT Transaction.ID AS Transaction, Transaction.TranID, Transaction.TranDate, BUILTIN.DF( Transaction.Entity ) AS Customer, BUILTIN.DF( TransactionMainLine.CreatedFrom ) AS SalesOrder, Transaction.ForeignTotal, BUILTIN.DF( Transaction.PaymentMethod ) AS PaymentMethod, Transaction.OtherRefNum, BUILTIN.DF( Transaction.Status ) AS Status FROM Transaction INNER JOIN TransactionLine AS TransactionMainLine ON ( TransactionMainLine.Transaction = Transaction.ID ) AND (… Continue reading SuiteQL query to get the Customer Deposits
How to fetch a suitelet date field without the time and timezone.
Use : record.getText({ fieldId: ‘custpage_jj_date’ }); to get only the date. use newDate() to get the corresponding date object.
SuiteQL query to get the item’s price level history
The query given below will give an item’s price level history. It is queried using the InvtItemPriceHistory table. SELECT BUILTIN.DF( PriceType ) AS PriceType, Version, Quantity, Price, Discount FROM InvtItemPriceHistory WHERE ( Item = 1223 ) ORDER BY PriceType, Quantity, Version