This article is relevant if you are seeking to use a NetSuite Saved Search on an object type that does not appear to be supported.
Background
During the development of an extensive NetSuite RESTLet 2.0 integration interface for a client, we encountered a need to get to a couple of objects that were not referenced by the NetSuite records browser. The goal was to allow users to edit saved searches in the User Interface (UI) so they could fine tune the integration as needed without asking for help from the developers. The two objects that we focused on was the NetSuite Payment Methods and Currencies.
Using the technique to have an interactive session with the NetSuite UI via the web browser, I crafted the saved search via code. Thereafter, the saved searches showed up just like any other and could be edited in the UI. Goal achieved!
Code Snippets to Build Saved Searches
Here are the code snippets I used in the web browser to build the saved search for payment methods and currencies. These two objects were then refined further using the UI using conventional methods:
var s = nlapiCreateSearch( 'paymentmethod', null, null ); var id = s.saveSearch('vd: api: payment method', 'customsearch_vd_api_payment_method') id = 939
var s = nlapiCreateSearch('currency', null, null) var i = s.saveSearch('vd: api: currency', 'customsearch_vd_api_currency') i = 943
Push on NetSuite Capacities
In working with NetSuite saved search, not all of them available in the UI are available via SuiteScript. For example, at the time of this writing, the Pricing Saved Search does not work via SuiteScript (a topic for another article). Yet, just because the Saved Search is not offered in the UI does not mean you can’t get access to it. The two elements referenced above, “paymentmethod” and “currency”, are not documented. However, they are still accessible via the API and appear to offer all the services that you would expect. Of course, we need to be cautious about using capacities that are not documented.
If you are a developer and you assert leadership to extend NetSuite capacities to get the job done, I suspect we would work well together. Let’s have a conversation.
One reader asked how to Search or get a List of all the NetSuite Custom Record Types. Here is what to do:
var s = nlapiCreateSearch( ‘customrecordtype’, null, null );
var id = s.saveSearch(‘customrecordtypes’, ‘customsearch_customrecordtypes’)
Get the result of id and go to the list of Saved Searches and you can then modify the output to fit the requirements.
Is there a way to schedule customer price lists and send the out to them as csv or an advanced html template. I can generate an advanced template and print it manually but can not seem to schedule it.
Hi Chris,
The native NetSuite Price List output tool does not. But you can craft a saved search and have it emailed out. It has an option to send a CSV or PDF.
Marty
Thanks for your reply. I have managed to create the pricing saved search and email it out as csv. My other question is, is there a way to call (or create) this saved search using suitescript so an external source can get it using a rest api?
Hello Chris,
That’s a generalized question unless I misunderstand your intention. Indeed, the way I think about the REST API is that it is basically a SuiteLet wrapper for REST semantics. Thus, whatever you can do in a Server Site Suitelet, you can do in the REST API. The challenge with undocumented features is that they pose a degree of risk because the functionality may simply disappear.
Marty