I am trying something like below:
require(['N/search'],
function(search)
{
var mySearch = search.create({
type : search.Type.FOLDER,
columns : ['internalid'],
filters : [ 'internalid', 'anyof', ID]
});
mySearch.run();
});
I get an error for search.Type.FOLDER that search.Type is undefined and so cannot find FOLDER of undefined
I was able to do a workaround by writing a type as 'folder' that worked, but, why is this enum not defined if it is documented in NetSuite's help.
I tried even logging all keys using Object.keys and the returned array does not contains Type key.
Has anyone tried this or if anyone can point out if something is wrong with my code?