1
votes

Is it possible to add a custom button to the standard Opportunity page that contains multiple options to select?

So for example...

Button Text: "Add Product"

  1. Drop down selection item 1: "Team 1 Products"
  2. Drop down selection item 2: "Team 2 Products"
1

1 Answers

2
votes

(this is going to be a heavily-linking answer. Please don't kill the messenger, it's just I'd rather see the native solution delivered by Salesforce or existing thing reused rather than brand new implementation attempt...)

There are 2 ideas you might want to vote on:

http://success.salesforce.com/ideaView?id=08730000000HAOK which was merged into http://success.salesforce.com/ideaview?id=08730000000BqRhAAK. The later one says it's "under consideration", fingers crossed!

Jason Venable from technrd.com has created an interesting Visualforce component you could check out: http://www.tehnrd.com/custom-multi-select-buttons/

If it's acceptable for you to display this button not as a standard one but as embedded visualforce page - awesome. If not - you might still check his solution out and see how much you can salvage. It's possible to inject javascript into any standard page layout (even "edit" layout which normally is hard to customize, doesn't display embedded buttons etc). You can inject it from Sidebar or with trick I've described here and here.

So you could write a code snippet that would obtain the id of "buttons panel" (it's <td class="pbButton" id="topButtonRow"> and <td class="pbButton" id="bottomButtonRow"> respectively and then dynamically add an entry using Jason's code as base.