R36525-3 PropertyValue - Value Id Validation
| Name | Value |
|---|---|
| Code | R36525-3 |
| Entity | Systems.Bpm.PropertyValues Entity |
| Name | ValueIdValidation |
| Attribute | ValueId |
| Layer | Back-End |
| Events | Commit |
| Priority | Normal |
| Modify | NO |
| Action | If (PropertyValueField != Null) AND (ValueId != Null) AND (Property.LimitToAllowedValues == True) Validates that: 1. ValueId exists among the property's allowed values IDs. Otherwise - throws an error (Error1) 2. If check №1 is passed, the rule validates that: PropertyValueField's value is equal to the value of the allowed value corresponding to the ValueId. Otherwise - throws an error (Error2). |
| Description | The rule ensures that only properties with valid values can be saved. A valid property value means that its id is among the property’s allowed values ids and that the value itself matches the allowed value corresponding to its id. |
| Message | Error1: ValueId '{ValueId}' is not found among the allowed values for property '{Property.DisplayText}'. Error2: The value for property '{Property.DisplayText}' for entity item with Id '{EntityItemId}' points to allowed value with ValueId '{ValueId}', but the property value does not match the allowed value. The value in the entity item is '{PropertyValueFeld}', but the allowed value is '{AllowedValues.Value}'. |
| Version | Introduced: v.24 |
| Revocable | YES |