Search Transaction record using Entity name

By default, performing a global search using the customer name will display related records such as Opportunities and Contacts, but it will not directly return transaction records. To retrieve transaction records associated with a customer, we recommend using the Quick Search portlet. This method allows for more targeted searches and will include the transaction data… Continue reading Search Transaction record using Entity name

Unrestricted Search Permissions in Client Scripts

When running a search on client scripts, the permission level is always set to the user’s currently logged in role. This may cause problems if the role does not have view permissions to the record. This restriction can be bypassed with the following workaround. Unrestrict search permissions on client scripts Update the client script to… Continue reading Unrestricted Search Permissions in Client Scripts

Search to get sales orders that does not have at least any of the given items

var salesorderSearchObj = search.create({ type: “salesorder”, filters: [ [“type”,”anyof”,”SalesOrd”], “AND”, [“cogs”,”is”,”F”], “AND”, [“shipping”,”is”,”F”], “AND”, [“taxline”,”is”,”F”], “AND”, [“datecreated”,”within”,”3/1/2025 12:00 am”,”3/10/2025 11:59 pm”], “AND”, [“sum(formulanumeric: CASE WHEN {item.internalid} IN (36496,36473,36470,36488,36486,36476,36490,36499,36477,36475,36483,36481,36479,36498,36480,36368,36492,36491,36494,36487,36482,36489,36627,36469,36485,36484,36478,36495,36472,36471,38291,36493,675,676,677,678,680,681,682,683,684,685,686,687,688,38311,691,693,694,36194,38287,38285,695,696,697,698,699,36188,700,38289,38290,36185,36186,707,708,36628,36189,711,713,714,36191,717,719,36363,720,721,36184,722,726,621) THEN 1 ELSE 0 END)”,”equalto”,”0″] ], columns: [ search.createColumn({ name: “tranid”, summary: “GROUP”, label: “Document Number” }), search.createColumn({ name: “internalid”, summary: “GROUP”, label: “Internal ID” }), search.createColumn({… Continue reading Search to get sales orders that does not have at least any of the given items

Setting When Ordered By in SuiteScripts

There are times when we only care about the values on a Record where a certain field is minimal or maximal. For instance, perhaps we want the Totals of Sales Orders by Customer, but we only care about the most recent orders – in other words, where the Date field is maximal. For situations like this, NetSuite… Continue reading Setting When Ordered By in SuiteScripts

Show Discounted Items and Their Corresponding Discount in Transaction Saved Search

Scenario Create a Saved Search that will show the Items with Discounts, their corresponding Discount Item and by how much.    Solution Go to Lists > Search > Saved Searches > New Click Transaction Click Criteria Click Standard Filters: Type: is Sales Order (or Cash or Invoice) Shipping Line: is false Tax Line: is false Click Results Click Columns Click Remove All button Fields: Type Summary Type: Group… Continue reading Show Discounted Items and Their Corresponding Discount in Transaction Saved Search

How to Sort a Search in SuiteScript Using search.Sort

Sorting results in SuiteScript is essential for organizing data in a way that makes sense for your needs, whether it’s ascending or descending. SuiteScript provides a simple and intuitive way to sort search results by using the search.Sort property. In this article, we’ll walk through how to implement sorting in a SuiteScript search, using an… Continue reading How to Sort a Search in SuiteScript Using search.Sort