Is there a dump of record.Type and search.Type key...
# suitescript
c
Is there a dump of record.Type and search.Type keys?
n
Script docs?
c
My bad not keys, but the key values. Trying to determine if there's a difference between the values (ie is it safe enough to pass record.type as search.type)
n
It's not
n
@NickSuite If you are using WebStorm, on the left under External Libaries, you'll see the SuiteScript 2 folder. Find the record js file, find search .js file, open both and look for, as an example, SALES_ORDER You'll see the Types listed out
👏 1
c
@NElliott When creating a 1:1 map there are a few keys that are missing/different between hitc/n/record and hitc/n/search (99% look to be the same key though). There's also no guarantee that the values are the same between the two types.
n
Why do you want to use record.Type keys for search.Type? @Christopher Quackenbush
n
I wasn't implying there was a 1:1, I was replying to "is there a dump of types", and that's the closest way to see it easily.
c
I'm working on my NFT fork, and adding in a basic n/search wrapper
a
Another way I just tried: On any record page in NetSuite, open the browser console (F12) and enter:
Copy code
require(["N/search", "N/record"], function(search, record){
    console.log(search.Type);
    console.log(record.Type);
});
Voila.
👏 1
c
I ended up using a large(ish) switch statement and took the keys from the HITC typings.