The feature is still under development and plan to integrate with conditional formatting feature. If you would like to get an update on this feature release, please contact us at support@ragic.com.
Before the feature is released, you can apply scripting as below:
Step 1. Create a free text field type with conditional formulas to check if the entry matches your criteria. Please return "Yes" when it matches.
Note: you may hide this field if necessary.
Step 2. Check the field ID of the free text field.
Step 3. Right-click on the sheet to access the JavaScript Workflow engine. Then, navigate to the "Post-Workflow":
Copy and paste the scripting:
var ENTRYLOCK_KEY = field ID; var entry=param.getUpdatedEntry(); var entrylockValue = entry.getFieldValue(ENTRYLOCK_KEY); if (entrylockValue == "Yes"){ entry.lock(); }
Please replace the field ID with the ID you get in step 2. For example, 1000925.
Take the "Sales Order" as an example, if you wish to lock entry when the "Status" field is "Complete" or "Cancelled", you may follow the steps below:
Step 1. Create a "Entry Lock Check" field with conditional formulas to check if "Status" field is "Complete" or "Cancelled":
Step 2. Get the field ID of the "Entry Lock Check" field:
Step 3. Access the "Post-Workflow" and paste the scripting:
var ENTRYLOCK_KEY = 1013368; var entry=param.getUpdatedEntry(); var entrylockValue = entry.getFieldValue(ENTRYLOCK_KEY); if (entrylockValue == "Yes"){ entry.lock(); }
In the future, when users update the "Status" field to "Complete" or "Cancelled" manually, the system will lock the entry upon saving. SYSAdmin can unlock it for editing if needed.
Note:
1. The workflow will only be triggered by manual edit. Edits that are made by action button, formulas recalculation, or from listing page will not trigger the post workflow.
2. Entry lock via this scripting won't show up in the edit history.