Discussions
Help With Saved Search Filter
Hi,
I'm trying to search a custom record using a filter for the ID. Unfortunately, according to the execution log, the search is still returning all of the records when there should just be 1. Any idea why my filter doesn't seem to be working? Thanks!
var prodCatFilter = new Array();
prodCatFilter[0] = new nlobjSearchFilter('id',null,'is',productCategoryId);
var prodCatSearch = nlapiSearchRecord('customrecord_tcc_supp_pdt_cat_list',null,prodCatFilter,null);
if(prodCatSearch != '' && prodCatSearch != null){
var testData = JSON.stringify(prodCatSearch);
nlapiLogExecution('DEBUG', 'search data: ', testData);