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
ArjunmcaArjunmca 

Hiding and visibling field in page layout based on picklist value

Hi,

 

I need to hide and visible a field in page layout based on another field picklist value. How can i do that?

 

Thanks,

Arjun.

Sridhar BonagiriSridhar Bonagiri

Hi Arjun,

 

I think you cannot hide a field on the basis of the pick list value selection in the native page layouts. But this can be achieved in a visual force page.

 

 

Regards,

Sridhar Bonagiri

Rakesh BoddepalliRakesh Boddepalli

If you are using visual force page, then it is fairly easy to handle it using the rendered attribute .

 

If you are using the Standard page layouts and considering you are not in Professional salesforce.com edition .

 

The following steps should work

 

1) Create two different page layouts one with the picklist field and other with the field removed .

 

2)  Create two different record types say with field present and other named field hidden and assign the page layout accordingly to the record type

 

2) When you change the picklist field value trigger the workflow to change the record type id  accordingly .

 

This should solve your purpose.

 

Mark this as solution if it works

ArjunmcaArjunmca

Thanks for you reply. I have to implement this functionality in Page layout. Not in visual force pages.

Rakesh BoddepalliRakesh Boddepalli

Please mark the reply as solution if it worked.

ArjunmcaArjunmca

I cant create another record type and another page layout for just one picklist field. Because i have 50 fields in that page layout.  Your solution works when you have less fields.