[SalesForce] Opportunity Product Button

Do you know if i can add a custom button on product section on opportunity?That is near the buttons ADD PRODUCT_CHOOSE PROCE BOOK_SORT

To solve this I have created a List custom button (OpportunityProduct—->Buttons and Links).
After I have added it to the page layout.
I am not able to select my VF page.Take a Look:
enter image description here

This is my controller in the vf page: standardController="Opportunity" extensions="tempsection3"
I have the same problem if i add standardController="OpportunityLineItem".

Thank you in advantage.

Br

Best Answer

Firstly, create a List Button under App Setup > Customize > Opportunities > Opportunity Products > Buttons and Links. Uncheck "Display Checkboxes (for Multi-Record Selection)", as last time I checked you can't have list controllers for OpportunityLineItem.

List Button

Then, when editing the Opportunity page layout click the small spanner above the products related list. The Buttons section can be a bit hard to find and will need to be expanded up from the button of the dialog. From there you can add your new button.

Related List Properties

UPDATE Linking to a Visualforce Controller

You can't use a custom visualforce page against a non top-level standard object. See StandardController recordSetVar OpportunityLineItem issue (my emphasis)

Yes we restrict list controllers ( standardCOntroller + recordSetVar attribute) to only top-level standard and custom objects so effectively you can not create a list button to a Visualforce page for OpportunityLineItem today. - Andrew, Product Manager - salesforce.com

Instead, you can set the Content Source to URL and point the URL at your Visualforce page.

List Button to redirect to Visualforce page

Related Topic