Discussions
How to use script to merge 2 nlapiSearchRecord result into one?
I'm trying to repair a third party developed 'Inventory Aging Report'. There's part of function to get all transactions in certain period for certain item to make it inventory qty up. I was planed to make a search to get all,
Filter[0]=new nlobjSearchFilter("type",null,"anyof",'InvWksht',null,2,0,false,true);
Filter[1]=new nlobjSearchFilter("quantity",null,"greaterThan",0,null,0,1,true,false).setSummaryType('sum');
Filter[2]=new nlobjSearchFilter("type",null,"anyof",["ItemRcpt","InvAdjst","CustCred","VendBill"],null,1,0,false,true);
Filter[3]=new nlobjSearchFilter("formulanumeric",null,"greaterThan",0,null,0,2,false,true);
Above is part of the filters. But it doesn't work, I suppose maybe summary type filter just can't use parentheses as the search page showed. So now I have to make 2 searches, one with filter 0,1, the other with filter 2 and 3.