Field Locker Administration Interface
The field locker admin interface allows you to configure a set of field to mark as read only to the user given a status of a record.
Feature Overview
The field locker admin interface allows you to configure a set of field to mark as read only to the user given a status of a record. This is particularly useful during approvals, as the approval process changes the status of the record as it moves through. The field locker can then ensure that the fields are not modified while it is being approved or after it is approved.
Design Details
The Field locker admin interface has 2 parts. A Interface Page and a Javascript. Open the Interface HTML page and select the required fields to mark as read only and required solution from the display list. By default the klevr records that have approvals enabled, also have the field locker script and plugin already applied.
The next step is JavaScript needs to be added to entity form where we need Fields locked.
Example:
Part A: Open the HTML page to configure the fields to make read only for a entity. WebResources/klevr_fieldlockeradmininterface.html

Select the entity (account) from the left side of the page.
Select the status reason of the entity under Status reason dropdown.
Select the list of fields to make read only for account table under the entity attributes.

Select the solution name from the list and required components will be added to this solution automatically.
Save the configuration by clicking "SAVE" button.
Part B: Adding the web resource to account form and configure Onload even.
Open the account form.
Look for Onload event and add the event with web resource klevr_fieldlocker.js and method name KlevrCommon.FieldLocker.

Example to update/change existing field locker
Open the HTML page.
Select the account entity.
Select the status reason dropdown.
Interface will retrieve existing config for account entity automatically and mark field selected from the Entity attributes from the right of the page.
Do changes/remove fields from config page.
Select the solution where all the components to be added automatically.
Save the changes by clicking "SAVE" button.

When we choose account entity, EmailAddress3 field marked as selected from the list automatically. This field has configured already and hence marked as selected. We can Uncheck this field from the list if we don't required to be locked anymore.
Last updated on