if a custom field has store value unchecked, and d...
# suitescript
s
if a custom field has store value unchecked, and defaulting is based on search can I still access the field via script? using a lookup the columns gives me blank results
e
I don't believe so
I believe Store Value must be checked to access in Scripts, except maybe Client Scripts
A
lookupFields
will definitely not retrieve the value, though
s
Oh? Really? I didn’t know that… Or it has to be stored so lookupfields can work? And search is gonna be the appropriate way for pulling up values if its not stored? I’m trying it out on my client script
e
Right it has to be Stored for searches/queries to retrieve it, and a
lookupFields
is just a convenience method on top of a search
s
Got you, thanks for taking the time Eric!
1
a
... if you're not storing the value in the field... but that's being populated by a serach... then ... run that search and it will give you the same result
🙌 1
e
Yep this would be one workaround; load the saved search in your script and add your record's internal ID as a filter
🙌 1
s
Appreciate you guys!
s
You can access the field only if you LOAD the record in your script.
🙌 1
So the context of how you will use the field matters. As per @erictgrubaugh, it will be empty in a search, but user Event scripts on the record can access it.
👍 1
🙌 1