This article is relevant if you are a SuiteScript developer and you want to better understand SuiteScript 2.0 semantics.
Background
During a recent engagement with one our newer technical consultants, he needed some assistance to develop a search to look up an item fulfillment that did not have a reference to a custom file attachment. Â He was confused because the NetSuite Saved Search user interface did not offer a way to select a null (none) reference. Â As such, I offered some guidance which helped him understand references to empty values in searches. Â I surmised that others in the Netsuite community may also wonder the same and offered this article. Â This article is very similar to the article I previously posted, NetSuite SuiteScript 2.0 Search Join and Summary Example. The following code snippet may be helpful to fellow NetSuite SuiteScript developers.
Sample SuiteScript 2.0
//sample suitescript 2.0 search expression illustrating file lookup on none and join with //group by to get a single value var n = 'mynote;' var a = new Array(); //search where there is no reference to a file a[0] = search.createFilter({ name:'custbody_prolecto_export_file_ref', operator:'ANYOF', values:'@NONE@'} ); //search for a specific instance of a note a[1] = search.createFilter({ name:'note', join:'usernotes', operator:'IS', values:n} ); //assemble the search and include join operator on output var s = search.create({'type':'itemfulfillment' ,'filters':a ,'columns':[ search.createColumn({'name':'internalid', 'summary':search.Summary.GROUP} )]} ); //run search to see results var result = s.run();
Work with NetSuite Technical Leaders
NetSuite’s platform is rich with possibilities and a wonder to those individuals who understand how to leverage existing structures to solve real-world business challenges.  Our team values actors that can think and lead clients to elegant  solutions.  If you feel you are under appreciated and wish to be with an organization that holds high standards for care an excellence, let’s have a conversation.