R19964 Product - Do Not Activate With Missing Property Values

Code R19964
Entity General.Products.Products Entity
Name DoNotActivateWithMissingPropertyValues
Attribute Active, PropertyValues
Layer Back-End
Events Commit
Priority Normal
Modify NO
Action If (Active == true && ProductGroup != Null && (ProductGroup.RequiredProperties != Null || ProductGroup.ParentGroups.RequiredProperties != Null))

, validate that:

ProductGroup.RequiredProperties.All(RequiredProperty.Required==false || Product.CustomProperties[RequiredProperty.Property.Code]!= null )
&&
ProductGroup.ParentGroups.RequiredProperties.All(RequiredProperty.Required==false || Product.CustomProperties[RequiredProperty.Property.Code]!= null )
Description The current rule validates that when activating a Product - all of the Required Properties of the Product Group and its Parent Groups for which the field Required is check-marked are inherited correctly by the Product. The Required Properties are inherited correctly when they are all set as Custom Properties for the Product and have values.
Message Product with code '{PartNumber}' can not be activated.

There are no values for all required custom properties - {JOIN(RequiredProperties.Property.Name)}.
Version Introduced: 2015
Updated: v.24 - additional validation for required properties in the parent product groups.
Revocable NO

* For more information about the Business Rules Documentation Template and a short explanation of each column, see topic System Business Rules.