0

I want to Show/Hide a Button as per specific Selected picklist field value on record details page for Opportunity Object. If the picklist field value is any thing rather than that value , Button should be visible.

  • 1
    Is this on a standard Opportunity page, or are you using a Visualforce page? Also, what have you tried so far? – Nick Cook Oct 19 '15 at 5:30
  • Hi Nick, This is on a standard Opportunity page having more than 10 custom buttons. I tried using Home page Components and custom javascript button, but the issue is, again i need to click on that particular JS button then it's working as aspected . which should be automated as per selection of picklist value, i mean no need to click any button. – Peter Oct 19 '15 at 5:38
  • Can be accomplished by either replicating your page layout entirely in Visualforce and do Rendering as you wish OR ...use a workflow field update to update the record type on the Opportunity object. You could then use page layout assignments to show or hide the button. – Salesforce Steps Dec 21 '15 at 9:33
  • You can write a custom controller for Opportunity, then use <apex:actionSupport> event = "Onchange" to set the boolean value to true for the selected picklist value. Use Rendered attribute with the boolean value from the controller to show/hide the button. – Manish Anand Oct 11 '19 at 8:45
0

Not too much of a suggested reasoning, but try home page component and write javascript for on load, then check the url if it Opportunity detail page, then fire off query from JS only to get picklist value and then do the same functionality as you are doing on your custom button click.

Hope it helps

Ray

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.