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
Anu-SFDCAnu-SFDC 

Reading Custom Url Parameters

Hi

 

I want to read the url parameters(which are unknown to me) in the constructor..

 

For example..: If i know the url parameter let's say &t i can read like this.

 

     amount = ApexPages.currentPage().getParameters().get('t'));
        

But My requirement is i want to read all the parameters which are coming in url and i want to pass those values in to the URL of an iframe

 

Can anybody help me??

 

Thanks

Anu

Chamil MadusankaChamil Madusanka

Hi,

 

In, ApexPages.currentPage().getParameters().get('t'));

 

getParameters() returns a Map<String, String>. Therefore you can Loop the Map and get the all the values of map.

 

Map<String, String> parameterMap = ApexPages.currentPage().getParameters();

Set<String> keySet = parameterMap.keyset();
for(String temp : keySet)
{
   String Amount = parameterMap.get(temp);
}

For More : http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_pages_pagereference.htm

 

If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

 

Chamil's Blog