function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BARJRDBARJRD 

Add custom button to Product related list

I am trying to add a custom button to the Product related list on my Opportunity page.  I have created the button but it does not appear as an option in the page layout.  The button is a List type and calls a VF page.  The VF page does not use a standard controller.

 

I successfully created a similar custom button on the Campaign History related list on my Contact page layout.  How is this any different?

 

Any ideas?

 

Thanks,

Barb

Best Answer chosen by Admin (Salesforce Developers) 
stwdevstwdev

What object did you create the custom list button on: Product or Opportunity Product?

 

The related list labeled Products on the Opportunity page layout is really a list of Opportunity Products (or, behind the scenes, the OpportunityLineItem object). So, I believe you would need to have created your custom list button on the Opportunity Product object in order for it to show up as a candidate button to add to the Products related list on Opportunity.

All Answers

ahab1372ahab1372

In the opportunity page layout editor, click on the wrench to modify the products related list. At the bottom of the pop-up window is a section for buttons which expands if you click on it. There you should find the button

BARJRDBARJRD

The button isn't there.  I've added many custom list buttons successfully.  Is there anything unique about adding one to the Products related list?

stwdevstwdev

What object did you create the custom list button on: Product or Opportunity Product?

 

The related list labeled Products on the Opportunity page layout is really a list of Opportunity Products (or, behind the scenes, the OpportunityLineItem object). So, I believe you would need to have created your custom list button on the Opportunity Product object in order for it to show up as a candidate button to add to the Products related list on Opportunity.

This was selected as the best answer
BARJRDBARJRD

You are absolutely right... I can't believe that I missed that!

satheeshrsksatheeshrsk

Hi,

 

I'm facing the similar issue. I'm unable to add custom button to Product related list on Opportunity page and unable to create a custom list button, it does not show up add custom buttons option. Could you please share how did you resolved it.  My VF page uses Opportunity standard controller and extension class. Its urgent, any help must be highly appreciated.

 

Thanks a trillion.

 

Best Regards,

Satheesh

BARJRDBARJRD
Hi Satheesh, Make sure you are adding the custom button to the Opportunity Product object vs. Product (see Stwdev's answer above). Barb
satheeshrsksatheeshrsk

I tried to create on both Opportunity & OpportunityLineItem. but no luck....

I'm unable to create a button on Opportunity Product, it does not shows any of  VF pages on Content drop down. My VF page using Opprotunity standard controller. see below

 

<apex:page standardcontroller="Opportunity" extensions="CB_Extension" id="thepage">

 

 

Thanks,

Satheesh