Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
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?