`Field` objects have a method `updateDisplayType()...
# suitescript
e
Field
objects have a method
updateDisplayType()
t
Looking inside the SS2.0 docs, I see an updateDisplayType method but it's in regards to a serverWidget. Would that apply to a custom field on a custom record within a client script?
e
Should, yes
Either the
Record
or the
CurrentRecord
reference should have a
getField()
method, which you can then invoke
updateDisplayType()
on
b
not quite
its Field.isDisplay on currentRecord
t
I've not had much exposure to Client Scripts in SS2.0 so I haven't had to use the currentRecord module. I am seeing in the docs that they start out by doing something along the lines of "var record = currentRecord.get()". What exactly is that doing? I can't find anything about it in the docs
b
You need a way to get a current.CurrentRecord. the get method is one way. Usually client script entry points include a reference to a CurrentRecord so you dont need to use get.
t
So it turns out, the issue I was having wasn't in regards to the currentRecord, but the type of field I was trying to get. Basically, I have an inline HTML field that I want to toggle on and off but when I try to use getField() on the inline HTML field, it returns null. I tested on other fields and they returned the field with no issue. Have either of you run into that before?