Use Case: Manager should be permitted to create records, but after they are saved, he or she should not be allowed to alter them because this data is the source of the workforce management system downstream. Of course, organisation to organisation may have different use cases, but almost all would need to control modification after saving the portlets.
In contrast to HRIS portlets, where we may utilize standard settings in business rules to set field characteristics, we can’t accomplish current scenario even with UI rules for MDF portlets. We’ll now look at how we might address this demand for MDF portlets.
Step 1: Create a hook field in MDF object
We are calling this hook field as we use this to know if a record is saved or not, its data type is boolean
Step 2: Create a business rule to default hook field value
This rule sets the hook field value to “Yes” when a record gets saved and assign this to the concerned object in Save Rules.
Step 3: Create business rule to control editing
This rule checks if the hook field conveying “Yes” and triggers an error when trying to edit the field. It should be assigned to the fields to trigger on change.
This is how error appears when concerned user trying to edit the data after saving
You can set the rule accordingly to restrict as much as necessary if you just want some fields to be editable and others not. That’s all there is to it; thanks for reading.