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)

1 Answer 1


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

  • Sir how to assign page layout by help of checkbox Commented Feb 14, 2017 at 18:07
  • need to write workflow field update, check my ans Commented Feb 14, 2017 at 18:09
  • can you please mention the steps how to update record type based on check box value Commented Feb 14, 2017 at 18:12
  • Can you try the workflow and let me what issue you are facing Commented Feb 14, 2017 at 18:32
  • 1
    I like first option but prefer second one as Recordtypes are overkill for such a small requirement. end user's would like to make more and more fields read-only, thus having multiple recordtypes..
    – Raul
    Commented Feb 14, 2017 at 19:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .