0

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)

2

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 – rahul gupta Feb 14 '17 at 18:07
  • need to write workflow field update, check my ans – Santanu Boral Feb 14 '17 at 18:09
  • can you please mention the steps how to update record type based on check box value – rahul gupta Feb 14 '17 at 18:12
  • Can you try the workflow and let me what issue you are facing – Santanu Boral Feb 14 '17 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 Feb 14 '17 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.