I have an 'X' check-box field on 'Y' custom object which cannot be edited once the record is created. How to achieve this requirement. Thanks in advance

  • 1
    Do you mean that someone can edit the value on the intial creation screen, but then can never edit the field after that?
    – Nick C
    Commented Nov 16, 2015 at 5:57
  • 1
    with standard layout you can't make that read only though you can write a validation rule which can prevent edit.
    – Himanshu
    Commented Nov 16, 2015 at 6:15
  • @NickCook Yes, once the record is created no one should be able to edit it so, I would like to show the field as read-only/output value.
    – Venky
    Commented Nov 16, 2015 at 6:28
  • Thanks @Himanshu for your reply is there any other possible way other than validation rule like hiding field from layout after creation of record.
    – Venky
    Commented Nov 16, 2015 at 6:32
  • besides Himanshu's answer, you would need to use a VF page that overrode the standard Edit page and another VF page using apex:detail and jQuery that overrode the standard detail (View) page
    – cropredy
    Commented Nov 16, 2015 at 17:31

1 Answer 1


There are two option to complete this requirement.

  • Write a validation rule/Trigger which will prevent for value change in that field
  • Standard layout doesn't give that flexibility where you can make field read only after it's creation so in that case you can follow below approach if you want to show field as read only.

    1. Create two record types and make first record type as default
    2. Create two different page layout per record type one with checkbox without read only and second page layout with checkbox read only.
    3. Once you save the record change the record type of record from first to second. it will change the page layout of the record and you will see field as read only.

You must log in to answer this question.

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