Is there a way to conditionally control the display of custom buttons? To be more precise, let's say I have a button which should be visible only if Field1==X. If the button is added to a page layout, it would appear at all times, which is not quite good from the user perspective as it clutters the GUI and diminishes speed of decision making.
I'm familiar with two work-around approaches, but none of them suit my needs. First one is embedding a VisualForce page containing only buttons in the page layout, and in the VF page controlling buttons' appearance through standard SFDC mechanism (components with rendered attribute conditionally set). Second one is a work-around I came across just recently, and it involves a formula field emulating the functionality of a button.
But both of these approaches result in custom buttons being placed either in a separate section (approach #1 with VF page) or in the fields section (approach #2). What I would like to achieve is have the conditionally controlled custom buttons appear in line with the standard ones, just like the 'regular' custom buttons.