+ Start a Discussion
hylim1215hylim1215 

Custom Button for Opportunity Partner Related List

Hi guys,

 

I'm trying to create a custom button in Opportunity Partner Related List. However, I cannot locate "opportunity partner" object under "Customize".

 

I need this custom button to copy a field (Pricebook) from Account and set it to Opportunity Pricebook field based on the "Primary" partner. Is this possible?

 

Please advice. Thanks.

MythiliMythili

Hi,

 

You cannot customize pa

hylim1215hylim1215

Ahhh.... ok. Is there a workaround? Any suggestion of how I can achieve this?

MythiliMythili
You will have to display the related list as inline vf page. Whenever a
partner is created, at the backend you can update the Standard Partner
object.
But i think you cannot update the Partner once created through code.
hylim1215hylim1215

Can you give me a more detail explanation? I'm new to this so I can't really get what you mean. Do you mean we need to develop a custom VF page for Opportunity in order to access the Standard Partner object?

MythiliMythili

No. We develop vf page and embed that in Opportunity layout as inline vf page. There you can place your button. When you click the button, you can redirect the user again vf page where he will craete partners. When he saves the partner, you can insert the partners into Partner object using Partner Api. When doing this you can fetch the account details and update the opportunity too.

 

But it will be a problem since you cannot use Partner aPi when updating.