Validation Rule: Prevent multiple citizenship records set to "Oui" for a custom DFF
Summary:
We have a custom Descriptive Flexfield (DFF) segment named "Principale" on the Citizenship section. It is configured as a checkbox using the OUI_NON value set (where checked = Oui and unchecked = Non).
Our business requirement is that a user can only have ONE citizenship record marked as "Principale" (Oui). If a user attempts to add or edit a citizenship record and set "Principale" to Oui when another record is already marked as Oui, an error message should be triggered to block the save.
Content (please ensure you mask any confidential information)
We attempted to create a validation rule in Visual Builder Studio using initial field values. However, this only evaluates the current record in memory and does not check whether another existing record for the same employee already has "Principale" set to Oui.