how can we get the select field text when getText ...
# suitescript
a
how can we get the select field text when getText will throw an error?
s
What is the error, are you trying to getText after using setValue on the field?
a
the value has been set by user through ui
s
Then you cannot use getText, you would need to do something like use a search.lookupFields() to get the text value.
a
and how can I get the list id?
to run the search
s
Use whatever the field is using, is it custom field or standard field?
a
custom
s
Look at the definition of the custom field, and find the record/list it is using.
a
thanks
@Sandii what if we don't want to check the definition?
can't we run a search for that?
s
No you cannot run a search to determine the list/record a field uses as its source.
a
sure about that?
we have customfield and list in analytics browser
@Sandii how can I use search.lookupFields()
text and values are sublist fields