I have created a new custom attribute in Profile Object. It is a boolean attribute. Now I need to retrieve all customers without that attribute (null) or with that attribute value being false.

I have tried a lot of ways but it always shows me 0 results. The only way I have found to retrieve the desired profiles is by setting the attribute manually to true and then to false.

I have also tried changing the custom attribute type to String or Set of Strings but the default value does not apply to existing profiles.

Does anyone know if can I retrieve the profiles without that attribute being initialized?

Thank you all.


1 Answer 1


The problem you were probably facing is related to how Boolean values work. A Boolean can have the value "null" which is why a query in the form of

custom.myValue = false

will not work for records where the value was not explicitly set to false. A way around this is to turn the if statement around.

custom.myValue != true

This is also true for other types besides Booleans and is not reflected well in the documentation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .