1

I have 3 fields on Account and 3 different buttons on contacts

On Account If Field A has value then Button 1 should appear to the User
On Account If Field B has Value then Button 2 Should appear to the User
On Account If Field C has value then Button 3 should appear to the User

I tried by workflow rule but its not working

2
  • Are the buttons on the Standard Contact page? On a custom VF page? On the Account's Contact related List? something else?
    – cropredy
    Commented Mar 6, 2016 at 7:55
  • Standard Contact Page
    – Revanth
    Commented Mar 7, 2016 at 16:59

1 Answer 1

1

For the standard Contact page, you could solve this by

  1. Adding recordTypes to Contact where the recordTypeId is set by workflow or Process builder based on the value of Account fields a-b-c.
  2. Using different page layouts for the three record types - each with different buttons

Or, you could replace the standard Contact page with a simple VF page that exploited apex:detail and some jQuery to hide the irrelevant buttons. This involves essentially hacking the generated HTML on the standard page to use css display:none to hide buttons. There is an SFSE question/answer on this approach here.

Once the VF page is constructed, override the View button on the Setup | Customize | Contacts |Buttons and Links page to use the VF page

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .