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
Ganesh KalepuGanesh Kalepu 

how to pass id parameter to url in vf page?

I have one vf page where i am displaying records of custom object in page block table and using <apex:commandLink> to made record name as link.
using <apex:param> im passing parameters i need. when i click on that click, it is redirecting me to new page where i can able to see details of that record bt im unable to see that record id in the url of new page.
can anyone help me how to solve this ?
Balayesu ChilakalapudiBalayesu Chilakalapudi
Call controller method from commandlink like,
<apex:commandLink id="commandLink" action="{!displayName}" value="Show Id" />
controller method will be like
public PageReference displayName(){
   String myID='place your Id here';
    PageReference pg=new PageReference('/test');
    pg.getParameters().put('id', myID);
    pg.setRedirect(true);
​   return pg;
}​

Thanks,
Balayesu​