to get the type of field using 2.0 what is the cor...
# suitescript
m
to get the type of field using 2.0 what is the correct log.debug context?
r
log.debug syntax is just
log.debug({title: 'title', details: 'details'})
m
yes but i need type of field
r
It depends what you mean by field. If you mean the in-memory data, you can use Javascript's
typeof
. If you're talking about the NetSuite field type, I'd look at the API document's Field object members.
That could be under
N/currentRecord
,
N/serverWidget
, etc.
log.debug('typeof var', typeof someVar);
for in-memory data type.
e
record.getField(...).type