Hi all, let’s say I have loaded a record. How can ...
# suitescript
b
Hi all, let’s say I have loaded a record. How can I fetch
field type
of custom fields, for example
datetime
, so I can format the data accordingly?
m
Copy code
var opp = record.load({ type: 'opportunity', id: 123456 });
var field = opp.getField({ fieldId: 'createddate' });
// field.type = 'datetime'
🎉 1
b
Awesome, it works with
record.create
too. Thank you!
Hey @Mike Robbins,
record.getField
doesn’t provide the
List/Record
(id:
selectedrecordtype
), is there a way to get that for any field?
m
Yeah, other than returning
select
as the type, there doesn't seem to be much more information you can get from it.
b
Ya, thanks for checking though. I will post on the channel to see if anyone has any workaround for it.