I created 3 custom checkbox fields.
I created a text field that resolves to "Yes" if all 3 custom checkbox fields are checked, and "No" if ANY of the custom checkbox fields is not checked.
The formula for setting the default value of the text field is as follows:
CASE
WHEN
to_char({custitem_field1}) = 'Yes' AND
to_char({custitem_field2}) = 'Yes' AND
to_char({custitem_field3}) = 'Yes'
THEN 'Yes'
ELSE 'No'
END
This works on the item records.
I've also created a saved search to display the results of each of these custom checkbox fields and a column for the text field. However, in the saved search, the text field column resolves to "No" for each item result.
I discovered that the saved search will work properly if I change the custom text field's formula to this, using "T" instead of "Yes":
CASE
WHEN
to_char({custitem_field1}) = 'T' AND
to_char({custitem_field2}) = 'T' AND
to_char({custitem_field3}) = 'T'
THEN 'Yes'
ELSE 'No'
END
The problem is that when I change the custom text field to this formula, then the individual item records all display "No" as the value of the text field. So, the formula breaks on the item records, but now works in the saved search.
The only way I can get the custom field to display the correct result on both the record and the saved search column is to use the following formula for the custom text field:
CASE
WHEN
to_char({custitem_field1}) = any('Yes', 'T') AND
to_char({custitem_field2}) = any('Yes', 'T') AND
to_char({custitem_field3}) = any('Yes', 'T')
THEN 'Yes'
ELSE 'No'
END
This is an "alternate solution," but it's not intuitive at all and it looks like a bug to me that NetSuite behaves this way. NetSuite seems to "read" checkbox fields differently depending on whether those fields are being viewed in a saved search or on a record.
Am I doing something wrong? Why would NetSuite behave this way?