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
Ritika JRitika J 

Passing parameter between the Pages

HI,

 

I have a commandlink on vf page , on click of this vf page i am calling a new vf page.

I want to pass some parameters from vf1 to vf2 .

 

Any suggestion how can i do this.

 

 

Thanks

Ritika

Navatar_DbSupNavatar_DbSup

Hi,


You can pass the parameter as query string while calling the 2nd VFpage. If you are using the same controller in both the pages then you can store the value inside a string and use this when method is call from the 2nd VF page.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

prady-cmprady-cm

another way would be to use the pageReference class

    public Pagereference  CallVf()
    {
    	
		 pr = Page.VFPage;
    	pr.setRedirect(true);
    	pr.getParameters().put('Pstartdate',string.valueof(startdate1));
    	pr.getParameters().put('Penddate', string.valueof(enddate1));
    	
    	return pr;
    	
    }

 in the command button action ="{!callVF}"