Lock all fields and details of a record based on condition
Hi Community,
Is there a way to freeze a record - lock all fields and connected details - based on a condition? For example, if an Order status is set to Completed, all the fields and details connected to order record should be locked. In order to make any change to the record, the status has to be changed from Completed to In Progress and then the record is unlocked.
Like
Hello,
If you wish to change access rights on a particular stage of the Order, you can simply add a "Change access rights" to its stage:
With it, you can state which roles/users should have their rights set to "read-only".
Alternatively, you could create a trigger process that is triggered once the stage of your Order section is changed and then do the same rights delegation as mentioned above with the "Change access rights" element in your business process (I created an example that is based on the stages of the leads section):
Hope it helps!
Best regards,
Artem.
I have an article on how to do that using code on a page here: https://customerfx.com/article/completely-locking-a-page-via-code-inclu…
However, the most reliable way to do this is to use a process and change the access rights of the record(s) - otherwise, they could still be changed in other places, such as the mobile client.
Ryan
Thank Ryan and Artem for the prompt response!
There are webservices that are called from client side when some fields are changed. Even with the permission restriction, these change events will still be triggered when the value is changed although it can not be saved by clicking the save button.
Looks like Ryan's solution is more compatible with the customizations we have in place now. That would help us lock the field giving no provision for the user to change the field value.
However, I do see in academy article (https://academy.creatio.com/docs/developer/interface_elements/interface… ) that setting the value for IsModelItemsEnabled will not lock fields that have "enabled" property defined in diff.
If the field has a binding for the enabled property in the diff array element or the business rule, the mechanism will not lock this field.
Not sure if there is a way to override the diff property other than removing it.
Regards,
Nirupama