Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
search.lookupFields on a checkbox causes error when unchecked
I am trying to find an equivalent in SS2.0 for nlapiLookupFieldValue() which return the value of a field on a record. the new search.lookupFields({
}): returns an object. this is fine, but when you try to return the value of a checkbox that is unchecked, you cannot easily get the value.
my example: var requiresPoNum = search.lookupFields({
type: 'CUSTOMER',
id: customerId,
columns: ['custentity_checkbox']
}).custentity_checkbox;
This returns true if the checkbox is checked but results in a script error if unchecked which is breaking my script. I was expecting more of a 'T' or 'F' result as nlapiLookupFieldValue() returned. any suggestions?