Using Field Locker Rule with conditions

Document ID : KB000074728
Last Modified Date : 15/06/2018
Show Technical Document Details
Introduction:
In ALC, I would like to set up a Field Locker rule on Projects to prevent certain fields from being updated if the status is set to "In Development".  How would I do that?
Instructions:
First add a new Field Locker rule object to the Edit event for Projects.
 
Next add the following to the script for the new rule object:
var status = item.getAttributes().getItemByAttributeTypeName("Status").getText();
#EXECUTE_DEFAULT_SCRIPT#

Set the Condition field to be:
status.equals(“In Development”)
 
And in the Lock Fields list add the list of fields to be locked:
Field Locker Rule Settings