This content has been marked as final. Show 4 replies
i have find the solution to this,
to make the a field read only which is based on the value of the another picklist field, you can try the following code.
PRE('<Subject>') = [<Subject>] OR NOT [<Status>]=LookupValue("EVENT_STATUS", "Completed")
here if the value of the "Status" picklist is equals to "Completed" then the "Subject" Field becomes read only.
Subject is a Mandatory Field on the Activity Object, hence you can't make it read only inspite of using Dynamic Page Layouts. Only way you can do is, by use of Field Validations.
You can define field validations on Subject or any other field. I prefer to choose a pick list field. Define the field validation on that pick list field following this logic.
1. If the Status is not Completed, return the current value of the field
2. If the Status is changed to Completed, return the current value of the field
3. If the Status is not changed and the Subject is changed, return "Non Existing Pick list value" to the field
By following the above logic, you can literally do anything. Hope this helps