Eystein Bye
02/16/2021, 9:55 PMsearch.create({
type:search.Type.ITEM_FULFILLMENT,
filters: ['inventorynumber', 'is', 'bcy32scy'],
join:['inventorydetail'],
columns:['entity']
}).run()
.each(function(result) {
log.debug(result);
return true;
});
Sandii
02/16/2021, 10:06 PMsearch.create()
? Join is not a parameter it takes.Kris Jones
02/16/2021, 10:06 PMsearch.create()
does not have a join
option parameter, joins are done within the columns option parameter
e.g. inventorydetail.entity
or search.createColumn({ name: 'entity', join: 'inventorydetail'})
I highly highly highly suggest using the Chrome Netsuite: Search Export
extension, which allows you to save a search in the UI and then have it create the equivalent search.create()
variable for you with all the joins, correct field names, etcEystein Bye
02/16/2021, 10:09 PMSandii
02/16/2021, 10:14 PMlog.debug()
, takes 2 parameters, trying to log that much as the title will not produce anything of value.Eystein Bye
02/16/2021, 10:39 PMstalbert
02/17/2021, 12:03 AMlog.debug()
has 1 parameter - the dastardly options
object.stalbert
02/17/2021, 12:03 AMstalbert
02/17/2021, 12:04 AMstalbert
02/17/2021, 12:10 AMstalbert
02/17/2021, 12:10 AMstalbert
02/17/2021, 12:10 AMstalbert
02/17/2021, 12:11 AMEystein Bye
02/17/2021, 7:41 AMsearch.create({
type:search.Type.ITEM_FULFILLMENT,
filters: [search.createFilter({
name: 'inventorynumber',
join: 'inventorydetail',
operator: <http://search.Operator.IS|search.Operator.IS>,
values: ['bcy32scy']
})],
columns:['entity'] // or any field from Item-Fulfillment
}).run()
stalbert
02/17/2021, 3:28 PMSandii
02/17/2021, 4:50 PMIS
is the problem, doesn't it use ANYOF
when you make the search in the UI?Sandii
02/17/2021, 4:52 PMIS
operator is for text fields, not select fields.stalbert
02/17/2021, 5:18 PMis
works on select fields too. battk can probably provide the help link where there's a table showing which operators work with each field type.Sandii
02/17/2021, 5:47 PMIS
is for checkboxes and email/textSandii
02/17/2021, 5:48 PMstalbert
02/17/2021, 6:29 PMANYOF
is the safe bet.