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:
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.
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.
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)
Instead, you can set the Content Source to URL and point the URL at your Visualforce page.