Setting boolean field to "Not set" in code

I have a Boolean field in my product field template. When changing this field from “True”/“False” to “Not set” on a variant in backoffice, the corresponding row in the table Products.VariantFieldData is removed. I need to mimic this behavior in code. How can I achieve this?

Litium version: 6.

Did you try with setting the field value to null?

Calling RemoveValue() on the field seems to do the trick. Haven’t tried setting it to null, maybe that would have the same effect as calling RemoveValue.

1 Like

Great! Set this issue to resolved if you are satisfied :slight_smile: