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

Pass Contact ID to a VF Page
I have a button on a Contact details page that launches a Visualforce page. This Visualforce page uses a custom controller for various reasons, but I need to reference the specific Contact that the user launched from. Is there an easy way to pass the Contact ID as a parameter to the new Visualforce page and reference it throughout my code?
Thanks..
Hi..
Try this
button behavior : onclick javascript
javascript code:
window.location.href = '/apex/urVFpagename?id={!Contact.Id}';
In ur controller class:
u can fetch this id
id contid=Apexpages.currentPage().getParameters().get('id');
All Answers
Hi..
Try this
button behavior : onclick javascript
javascript code:
window.location.href = '/apex/urVFpagename?id={!Contact.Id}';
In ur controller class:
u can fetch this id
id contid=Apexpages.currentPage().getParameters().get('id');