You need to sign in to do that
Don't have an account?

How to fetch account details based on opportunity id?
I have a button on an opportunity, and able to fetch the id. so now based on this opportunity id, how can i fetch the account details associated to this opportunity.
On click of the button I am rendering a visualforce page.
window.location.href='/apex/VFP_OneButtonApp?id={!Opportunity.Id}'
And in my controller i am fetching this Id.
So in my controller based on this opportunity.id, I need to fetch the associated account.
In controller after fetching Opportunity Id, Use this query to fetch the associated account.
Thanks,
Dhanya
Let us know if this will help you