You need to sign in to do that
Don't have an account?
Krish N
How to make Controlling picklist field value as read-only upon save in VF?
Hello, I've a VF page on Case object. I've custom picklist fields for Site State and Site Region. Site state is the controlling picklist field and Site region is the dependent field. Upon creating a case on VF page and saving it, I want the Site state and Site region fields to be read-only. I've tried different ways but I'm getting this error:"The dependent picklist 'Site Region' requires its controlling field 'Site State' to be present on the page." The fields show up as picklist fields. I want them to be read-only. How do I overcome it? Please help me. Thank you!
Call an event from the VF oage as soon as the record gets changed to a particular value, it will call the lock() Apex Method.
https://sfdcfanboy.com/2017/04/26/7-ways-to-lock-a-record-in-salesforce/
Else, if the fields are the VF ones and no where present on the database in the Standard or custom objects, it is possible only via the code as suggested earlier.