I don't normally use JS objects but was testing this chrome plugin (export as script) where you can basically generate script code from a search. I am having issues though with the syntax.
function GetEmployee()
{
var columns = [];
var employeeSearch = nlapiSearchRecord('employee'[['access', 'is', 'T'], "AND", ["internalid", "anyof", "121212"]], [columns[0] = new nlobjSearchColumn('internalid'), ]);
if(employeeSearch)
{
for (var i = 0; employeeSearch != null && i < employeeSearch.length; i++)
{
var record = nlapiLoadRecord('employee', employeeSearch[0].getValue(columns[0]));
var id = record.getId();
nlapiLogExecution('DEBUG', 'return id', id)
}
}
return true;
}
Error: That search or mass update does not exist. My saved search returns a record so I was expecting the code to do the same...