You can use built in 'N/search' ```search.create({...
# suitescript
d
You can use built in 'N/search'
Copy code
search.create({
        type: search.Type.CUSTOMER,
        columns: ['firstname','lastname','email','phone','internalid'],
      });
p
if i don't specify
columns
would i get all the columns
d
You can go through the documentation But we use columns as mandatory.
n
pretty sure if you don't define columns you don't get columns back. Should be able to test that easily enough in the debugger / console.
p
okay. also where you used
search.Type.CUSTOMER
how to get this for other Lists, you know for Sales order, would it be SALES_ORDER or SALESORDER ?
a
@Php you would use
SALES_ORDER
. You can see the rest of the available types under the N/Search module documentation here: https://netsuite.custhelp.com/app/answers/detail/a_id/48913
I would recommend reading through the Module documentation, as N/Search gives you all the functionality of Saved Searches in Netsuite. So alternatively you could search by type
TRANSACTION
and then create a search filter for the sales order type.