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
John Manager Training DepJohn Manager Training Dep 

Display certain fields in the salesforce page layout based on the checkbox?

Hi Team,

Is it possible to display certain fields in the salesforce page layout based on the checkbox?
For eg if ChecboxField = TRUE
Show 10 fields in Page Layout.
if ChecboxField = FALSE
Show 5 fields in Page Layout.

I want to use the same Record Type.

Any constructive suggestion or feedback much appreciated!
Sathish LoganathanSathish Loganathan
I don't think you can do this using OOB. You have to create a vf page and check the checkbox value in controller and display the fields inside the vf page and embed that page inside your layout.
John Manager Training DepJohn Manager Training Dep
Can you please provide sample code?