// Create a filters array and define search filters for an Item search
var filters = new Array();
// filter by a specific customer (121) on the Pricing record
filters[0] = new nlobjSearchFilter('customer', 'pricing', 'is', '121');
// filter by a currency type (USA) on the Pricing record
filters[1] = new nlobjSearchFilter('currency', 'pricing', 'is', '1');
here the two filters...
does it mean that the system made a join operation between customer and pricing record( if so, how are they joined? or how the system does a matching between them? on which column)
// set search return columns for Pricing search
var columns = new Array();
// return data from pricelevel and unitprice fields on the Pricing record
columns[0] = new nlobjSearchColumn('pricelevel', 'pricing');
columns[1] = new nlobjSearchColumn('unitprice', 'pricing');
as for this, it hints that pricelevel and unitprice are columns for the record pricing, right?
// specify name as a search return column. There is no join set in this field.
// This is the Name field as it appears on Item records.
columns[2] = new nlobjSearchColumns('name');
does this mean that name belongs to record item?
// execute the Item search, which uses data on the Pricing record as search filters
var searchresults = nlapiSearchRecord('item', null, null, columns);
here i am wondering, why is not filters passed to the api as a parameter? is it because the columns are already selected using the specified filters, thus they do not need to be used?