So I'm at a bit of a loss as to what I'm doing wrong here, but basically I've been trying to run a search within a SuiteScript where I access the Item Fulfillment record type. However I'm continually being given the SSS_INVALID_SRCH_COL error from NetSuite on columns that are specifically listed in the Records Browser (and are also showing up in the 'NetSuite Field Explorer' browser extension).
Here is a snippet of the search I'm trying to create:
var tSearch = search.create({
type: search.Type.ITEM_FULFILLMENT,
columns: [{
name: 'internalid'
}, {
name: 'createddate'
}]
});
Whenever I try to run this search NetSuite is giving me the SSS_INVALID_SRCH_COL and the following detail: An nlobjSearchColumn contains an invalid column, or is not in proper syntax: createddate
Of course after checking the records browser I found this to be the correct column name so I'm not sure why NetSuite doesn't like the search column.
Is there something else I'm missing about SuiteScript searches? Is searching the Item Fulfillment record type not allowed or something (though it should be as it is listed as a type under the N/search module).
Any assistance is greatly appreciated here.
for searches the field you are looking for is datecreated
. This is a fun area of Netsuite where the search fields can have different script ids than the fields you'd retrieve from the records themselves.
For searching you get your fields from https://system.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2020_2/script/record/transaction.html