[SalesForce] make a field read only

I have a Field on account called Isactive__c which is checkbox type and i want when ever checkbox is true
Account number field (standrad field) becomes read only . If there is existing value then it can be only viewed but if there is no value you cant edit it (only by customization, no use of trigger or apex)

Best Answer

Two ways you can do that.

Option 1) Create a separate recordtype and page layout and update the recordtype based on the checkbox value selection. Need to write a workflow field update to update recordtype based on checkbox value. In the page layout you can make the field as read only.

Note: Salesforce provided mandatory fields cannot be readonly. Like status field in Case object.

Option 2) create a validation rule to restrict editing when checkbox value is true

Related Topic