I need to implement following rule. If column A
is set as true
, column B
becomes mandatory field. On the other hand if column A
is set as false
, column B
is not mandatory field anymore, its content should be emptied and it should become read only.
These are 2 separate problems:
Conditional Mandatory Field
This has to be solved by using a Validation Rule. That means:
- Create a State Workflow for the desired entity (without specifying the entity field)
- Under the state workflow add an event handler for RecordUpdated
- Assign a sequential workflow which will, as a first step, load your record (by provided id) and assign an End Rule that will validate your record
Conditional Read Only Field
This needs to be solved using a Row Level Security Rule. You need to
- Add a row level security rule under your entity field for Deny Write
- Assign a Condition Rule that will return true when the field should be read only
- Don’t forget to assign another row level security rule on the entity level for Allow Everything (on level e.g. 999).
1 Like