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
adamproadampro 

Creating Custom Detail Page Button that Re-directs to VFP

Hi,

 

I'm trying to create a custom Detail Page button on Accounts that will re-direct to a custom Visualforce page I made. On the VF page I need the Account Id from the previous page in order to query some information on it. How do I do this?

 

Thanks!

Sam27Sam27

If you are still looking for it

 

Go to Setup - Customize - Accounts -Button and Links - New

 

fill the values....choose button or link

 

content source URL

 

put the value in big box as

 

/apex/yourPageName?accountId={!Account.Id}

 

you can put other values from the insert field drop down if required........lots of option

 

if you want to get the value of account id , you can use 

in controller ----    ApexPages.currentPage().getParameters().get('accountId')

on page - {!$CurrentPage.parameters.accountId}

 

 

I hope that helps