This article is relevant if you develop software using NetSuite’s SuiteScript and you are working with Search Filters.
NetSuite Transaction Type SearchFilters
If you are developing a search query and you need to reference the NetSuite Transaction Types, you need to translate what you see in the Saved Search user interface to the equivalent nlobjSearchFilter code. If you are actually looking for the Internal ID to perform an update, check out NetSuite Transaction Type Internal ID Numbers. Here is the latest list as of the time of this article.
Transaction Type | SuiteScript SearchFilter |
Assembly Build | Build |
Assembly Unbuild | Unbuild |
Bill | VendBill |
Bill CCard | VendCard |
Bill Credit | VendCred |
Bin Putaway Worksheet | BinWksht |
Bin Transfer | BinTrnfr |
Bill Payment | VendPymt |
Cash Refund | CashRfnd |
Cash Sale | CashSale |
CCard Refund | CardRfnd |
Check | Check |
Commission | Commissn |
Credit Card | CardChrg |
Credit Memo | CustCred |
Currency Revaluation | FxReval |
Customer Deposit | CustDep |
Customer Refund | CustRfnd |
Deposit | Deposit |
Deposit Application | DepAppl |
Expense Report | ExpRept |
Inventory Adjustment | InvAdjst |
Inventory Count | InvCount |
Inventory Distribution | InvDistr |
Inventory Transfer | InvTrnfr |
Inventory Worksheet | InvWksht |
Invoice | CustInvc |
Item Fulfillment | ItemShip |
Item Receipt | ItemRcpt |
Journal | Journal |
Opportunity | Opprtnty |
Payment | CustPymt |
Purchase Order | PurchOrd |
Quote | Estimate |
Return Authorization | RtnAuth |
Sales Order | SalesOrd |
Sales Tax Payment | TaxPymt |
Statement Charge | CustChrg |
Transfer | Transfer |
Transfer Order | TrnfrOrd |
Vendor Return Authorization | VendAuth |
Work Order | WorkOrd |
SuiteScript Code Example
Here is code that returns a count for all the Invoice Transaction Types:
// return the Number of Transactions of Type Invoice function getInvoiceCount(){ var filters = []; filters[0] = new nlobjSearchFilter('type', null, 'is', 'CustInvc' ); var searchresults = nlapiSearchRecord('transaction', null, filters, []); if (searchresults){ // this code will break if there are over 1000 results. For example purposes only. return searchresults.length } else { throw nlapiCreateError('getTransactionCount_ERROR', 'Function did not return a Transaction of type Invoice.'); }; };
Related Articles
- NetSuite Transaction Type Internal ID Numbers
- NetSuite SearchFilter Transaction Internal Status List
- NetSuite SearchFilter Internal Account Type Codes
- How To: Script to Automate NetSuite Journal Entries
- Showing NetSuite Internal IDs and Field Names
- Use Custom Logic to Drive NetSuite General Ledger Posting Accounts
Get Help
If you are looking to get more out of your NetSuite account, contact us. We love to innovate on the platform.
Great Post Marty. I wrote about this one as well on my blog. I don’t know why these are not clearly documented by NetSuite ;(
Hi,
I saw your blogs. Very nice and helpful. Could you provide me a sample of phonecallsearch with filter of Created by (record ref). Currently i am working in netsuite 2013_2 version
It sounds like you are working in SuiteTalk (Web Services), correct? This article is about using SuiteScript. In your case with SuiteScript, you would code against the Activity table (internalid: activity) and you would search on the ‘createddate’ search column.
Marty
THis is a great resource for transaction types. Is there a something that would show the Type ID for Netsuite Native Lists such as currency. I need to know the Type ID instead of the record id “currency.nl” Is this possible?
Hi Brett,
Are you looking for a list of currencies? The currency table varies in NetSuite as it can be setup differently for every account. Currencies can be looked up with the search API. Here is a link to the record structure at the time of this writing:
https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2014_2/script/record/currency.html
Marty
Hi Marty, this is great help!
I’m doing some research on how to identify if a user has already bought an item.. so I have to create a search script and relate items against customer and purchase order.. Do you have any clues or help on this?
Thanks!
Pablo.
Hi Pablo,
This saved search should be straight forward. Start with a Saved Transaction Search. Use criteria for “Name” = your customer. Then use “Item on Any Line” to reference the item that you care about.
Marty