1

I am using the Account standard object and the Opportunity standard object.

I have a lookup relation from Account to Opportunity. A 'Related List' appears on Opportunity related tab. enter image description here The code customization I have done is I have added a "List button" on this list and i want to run some custom code for showing a visualforce page where the goal is to add some accounts to the related list.

The error or problem I have is that whenever i press the 'Add' button, the object passed to the controller+VFpage is an Account object (The owner of the Opportunity). Whereas what I want is I want to go to an Opportunity instance, and start adding Accounts to this related list.

I can provide more technical detail if needed, however i believe this to be more of a structuring problem.

Thanks for any help!

  • You will need to provide a minimal code of your implementation for anyone to be able to help you out here. – Jayant Das Mar 28 at 13:46
  • My code is irrelevant. I have a VF page that uses the Opportunity controller but an opportunity is never passed down to them to begin with. I basically want to have a list of Accounts inside an Opportunity. Add to that the ability to add existing accounts to the Opportunity. This seems to require a mixed solution. – fisker Mar 29 at 9:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.