You need to sign in to do that
Don't have an account?

Page .getParameters()
This does not work:
Map<String,String> req = ApexPages.currentPage().getParameters();
System.debug.(Logginglevel.INFO, req.size.format);
for (String s:req)
{
System.debug(s);
}
I get this error message:
Error: Compile Error: Initial term of field expression must be a concrete SObject: MAP:String,String at line x column x |
What does that mean ?
"currentPage().getParameters()" is supposed to return a "Map<String,String>"...
Also, is there a way to format the debug output a little bit so it is more readable ? It displays in one big string in the Console right now...
Thanks !
currentPage().getParameters()" is supposed to return a "Map<String,String> but not the LIST:MAP:String,String.
lvivian
Not sure I understand what you're saying but this works:
Map<String,String> req = ApexPages.currentPage().getParameters();
Set<String> cbKeys = new Set<String>();
cbKeys = req.keySet();
List<String> cbValues = new List<String>();
cbValues = req.values();
for (String k:cbKeys)
{
System.debug(k);
}
for (String v:cbValues)
{
System.debug(v);
}
Thanks !
This may be a little better:-
Map<String,String> req = ApexPages.currentPage().getParameters(); for(string key :req.keySet()){ System.debug(key+': '+req.get(key); }
Thanks !
Right now I am just trying to keep my head above water, translating everything mentally to C#...
Every bit counts !