Magento – Magento2 custom attribute default value

attributeseav-attributes

Are default values for custom attributes taken into account at all?

  1. Create a yes-no/dropdown/text attribute, set a defautl value, add it to an attribute set.
  2. Open a poduct to edit it.

Expected result: The custom attribute has the given default value.

Actual result: The custom attribute has no value.

Why does this not work?

Best Answer

Default values won't be applied to the existing entities, a default value will only set on an entity when an entity is saved.