I'd like to make a section record completely read-only based on whether the value of a status column. If the record is Draft, it should be editable, and when it is Active or Inactive it should completely read-only.
We're using a business process to handle the Activation of the record, so I've tried changing the access rights of the record to remove edit and delete permissions, which works to an extent; the record can be put into edit mode (when the Save button is visible), but it cannot be saved, as the user is prompted they lack permissions to save the record.
What I'd really like is so each field is completely locked, so the user cannot even get to the stage where the option to save the record is available. Is something like this possible?
Like
You can use business rules to make fields editable or not editable based on the value of a field. You will need to create a business rule for each field one at a time. If the condition is not met, the field will not be editable. This does not work for detail records. You will need to use business processes to control edit/delete of detail records or stop the creation of new records based on reading the status field you mentioned.
This article can give you some ideas - https://academy.creatio.com/documents/technic-sdk/7-15/how-block-fields-edit-page
Thanks both for the responses! Do either of these allow a system admin to edit the fields/details? If not, is there a method to implement this?
Morgan Rees,
The only option that would work with your requirements is creating a business rule with code, specifying the condition that the checkbox is set to true plus the user doesn't have a system administration organisational role. Unfortunately, the second part wouldn't be possible to do in UI, which is why you would need a development for that.
Here is an article how to make a business rules with code:
https://academy.creatio.com/documents/technic-sdk/7-15/bindparameter-rule-how-lock-field-edit-page-based-specific-condition
An article how to identify if the user has a certain role:
https://customerfx.com/article/determining-if-a-user-has-a-specific-role-in-bpmonline/
Morgan,
My workaround for this has been to use the Records Group Editing addon to edit a value which is locked in the edit page. But Dennis's comment is more robust.
I have not tried it, but I thought that I could set a checkbox under column permissions to only editable by admin, then make the business rule dependent on that checkbox. Not sure if that would work.