+ Start a Discussion
Suresh RaghuramSuresh Raghuram 

Issue in capturing parameters from the URL

Hi Community,

I am navigating from one vf page to another vfpage and passing parametrs through URL and trying to capture the parameters in the other controller.

My Url looks like this.

I used the following methods
string str = ApexPages.currentPage().getUrl() ;
string accountId = ApexPages.currentPage().getParameters().get('AccountId');

Above both did not work for the above said scenario.

What is the issue and how can i over come it.
Please share your thoughts and ideas.

See if this helps http://www.forcetree.com/2009/06/passing-parameters-to-visualforce-page.html
This line is correct :-

string accountId = ApexPages.currentPage().getParameters().get('AccountId');

Can you debug to see what's coming in accountid.Also,if you can post the whole code it would be asy to debug ...
Hi Suree,

The code - string accountId = ApexPages.currentPage().getParameters().get('AccountId');  should work ideally.

Why are you using different controllers ? Associating the same controller with both the pages should work.

Suresh RaghuramSuresh Raghuram
both pages have two different standard controller, So i prefered them to be in the different controllers.
Suresh RaghuramSuresh Raghuram
Thanks for the reply I got it just with what I was did.