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
MayankDkPantMayankDkPant 

Problem with New Custom Button on Opportunity Product related List

Hi,

 

I have to add a new custom button on product related list in opportunty, but when I create a button of type list in Opportunity product object and clicks on visual force page it shows no content. For page to be displayed as content I need to take "recordsetvar" but recordsetvar is not acceptable for opportunityproduct object. What all possible scenarios I can have to achieve my requirement.

 

Going ahead I need a visual force page which displays all products and user can select the product(multiple) and add it to the opportunity.

 

Any help will be appreciated.

 

With Regards,

Mayank Pant

sekharasekhara

Hi 

 

For adding custom button u need to give standardController name.{Opportunitylineitem}

 

 

Try this,

 

Let me know in case of any issues.

MayankDkPantMayankDkPant

Thanks for reply.

 

OpportunityLineItem does not supports recordsetvar, there by that page will not be available for list type button option. No content will be available.

 

Mayank Pant

sekharasekhara

Hi,

 

Same think I Tried in my Developer Account .

 

There it is working fine.

 

I am unable to understand why u are using recordsetvar

MayankDkPantMayankDkPant

Thanks.

 

Can you show a brief of your code to me, so that I can understand what you are saying is what I need.

 

Thanks in advance.

 

Mayank Pant

sekharasekhara

<apex:page  standardcontroller="Opportunitylineitem">

<apex:page>

 

MayankDkPantMayankDkPant

After doing this, when i create a list button in OpportuntiyProduct object then this page is not available. How you have achieved  this?. Creating List Type button.

 

Thanks

Mayank Pant.

sekharasekhara

Follow same procedure for that also.

 

MayankDkPantMayankDkPant

Thanks but I didn't get which procedure to follow for button. Can you elaborate it a bit?

 

Thanks.

 

Mayank Pant.

sekharasekhara

Is ur button added to your page layout?

I so can u mark it as solution.