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
neeedhelpneeedhelp 

How can I get Id of a contact object into a custom controller class

How can I get Id of a contact object into a custom controller class

venkateshyadav1243venkateshyadav1243

ApexPages.currentPage().getParamete().get(id);

neeedhelpneeedhelp

If I use that I'll be getting the current controller Id....But not the contact id

raj123raj123

if you want to invoke the VF page  from the  the button click 

 

you can create a java script action button and pass the iD like following 

 

/apex/URCUSTOMPAGE?id=00B40000006Tev5

 

and access the ID using

ApexPages.currentPage().getParamete().get(id);