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. 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!