Field Locker
The field locker allows you to configure a set of fields to mark as read only to the user given the status of a record.
Feature Overview
The field locker allows you to configure a set of fields to mark as read only to the user given the 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.
Assumptions
- In order to use the Poly Editor tool, you must have the Klevr_Utilities Solution Imported into your environment.
Design Details
The Field locker has 2 parts. A plugin and a Javascript. This needs to be added to the entity you wish to apply field locking to. By default the klevr records that have approvals enabled, also have the field locker script and plugin already applied.
The next step is to define the configuration for the locked fields. This is done by creating an environment variable. The format for the environment variable is: klevr_Lockedfields_<entitySchemaName>_<Statuscode>, e.g. klevr_Lockedfields_klevr_contract_1. This means that for a klevr contract that is in status reason code 1, the fields will be locked.
The value of the environment variable is a json array of strings containing the field schema names for the fields you wish to have locked, e.g. ["klevr_projectid", "klevr_totalpaid", "klevr_integrationstatus"] This will lock the 3 specified fields when the statuscode is 1. Other fields will still be editable, or as per your form configuration.
Last updated on