I'm new to Netsuite and SuiteScripting. I am trying to create a Search in SuiteScript 2.0 that will display Inventory Items based on a few filters. One of the filters I am trying to use is in the items related records. I am able to do this in Netsuite's saved search but need to be able to do it in SuiteScript.
Creating the search criteria in Netsuite:
The Transaction: Type is Sales Order is what I am trying to copy in SuiteScript.
I tried using the Join tag but that does not seems to change my results at all. The following code will run but does not change the results.
search.createFilter({
name: "internalid",
join: "transaction",
operator: search.Operator.IS,
values: 'salesorder'}) ]
If I try to change Name: to "type" it runs but gives no results.
search.createFilter({
name: "type",
join: "transaction",
operator: search.Operator.IS,
values: 'salesorder'}) ]
Any help is appreciated.