Where can I find the mapping between the search co...
# suitescript
r
Where can I find the mapping between the search column Item : Type and the values for loading a record. I want to create a dictionary like this:
{InvtPart: record.Type.INVENTORY_ITEM}
a
does the item : type search column return InvtPart?
r
yes
I was able to guess with most of them, but there are some examples that don't seem to be mapped, such as Expense. There is no
record.Type.EXPENSE_ITEM
.
a
how exactly? I'm seeing this?
r
That is the
getText
version.
getValue
would give you
NonInvtPart
👍 1
a
k i'm dumb 😄
r
it's a very confusing part of netsuite
Untitled.js
b
expense items arent in the SuiteScript Supported Records, so you wont find it in the record types enumeration
👍 2
a
I'm not sure it matters though? the record.Type.BLAH_BLAH just maps to the string... which you already have... so just leaving 'expenseitem' in there for the mapping would be accurate
of course if they're not SS supported. I'm not sure if you can do whatever it is you want to do with them... you can definitely load the records tho
n
Look at result.recordType (case sensitive)
👍 1
May be useful for those you don't have an enum for.