function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rahul Gupta 166Rahul Gupta 166 

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 chosen by Rahul Gupta 166
Travis Lee 1Travis Lee 1
Hey Rahul,

I believe in order to accomplish this, you'd need to create a separate Record Type/Page Layout where your field is marked Read Only based on Page Layout. A workflow that fires when your checkbox is True could then toggle the Record Type to your new Record Type/Page Layout combination. This would, however, require the record to be saved in order to initiate the workflow.

Hope this helps!

Travis

All Answers

Travis Lee 1Travis Lee 1
Hey Rahul,

I believe in order to accomplish this, you'd need to create a separate Record Type/Page Layout where your field is marked Read Only based on Page Layout. A workflow that fires when your checkbox is True could then toggle the Record Type to your new Record Type/Page Layout combination. This would, however, require the record to be saved in order to initiate the workflow.

Hope this helps!

Travis
This was selected as the best answer
Rahul Gupta 166Rahul Gupta 166
Sir i tried but it not happening 
Travis Lee 1Travis Lee 1
Ok Rahul, can you include some pictures or details about how you configured the scenario I described above? I need some detail in order to continue troubleshooting for you.
Rahul Gupta 166Rahul Gupta 166
Thanks sir i did lil bit of  R & D on that i got way out ... Thanks for the help