netsuite - Suitescript check if field is searchable -


i trying search account data using suitescript 1.0 in netsuite, getting "ss_invalid_srch_col details: nlobjsearchcolumn contains invalid column, or not in proper syntax:" error. using admin role login. following code sample causing error

function getmasterdata(datain) {   try     {       var recordtype = 'account';         var c;       var strcolumns = nlapicreaterecord(recordtype).getallfields();        var searchcolumns = [];       (c = 0; strcolumns.length && c < strcolumns.length; c += 1)       {              searchcolumns.push(new nlobjsearchcolumn(strcolumns[c]));       }        var data = nlapisearchrecord(recordtype, null, null, searchcolumns);       return data;       }     catch (ex)     {         nlapilogexecution('debug', 'getmasterdata', ex);     }     } 

i know reason: getallfields() returns fields (searchable/nonsearchable) nlapisearchrecord works searchable fields. query how can filter searchable fields in fields returned getallfields() function.

can please me regarding this. in advance.

there's no way know if field can used in search can supported fields records browser , create array them.

note can record fields , values using nlapiloadrecord.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -