Is there a way to know the type of the fields in s...
# suitescript
m
Is there a way to know the type of the fields in standard records, in order to know the char limit? If you open the Record Browser, it mentions just two text types (Text, Textarea)... but NS has (Free-Form Text, Long Text, Rich Text, Text Area)... so how would you know the char limit?
c
Does Field.type help?
c
Suite Answer 10085 has a list
You have to code around it yourself by either doing a check on the length or doing a try/catch and handling it.
b
going by field types is normally only good enough for custom fields
it wont work for fields with custom max lengths
it wont work for standard fields, which have various maximum lengths
m
@Clay Roper Thanks, didn't think of it, it may be helpful. @battk Do you mean the same type on different records could have different limits?
b
yes
the same type on the same record could have different limits
m
I didn't know this. I will try to reach out to the support.
Thanks