You need to sign in to do that
Don't have an account?
SFDC_Learner
Query string parameters - List of Ids passing from one page to another page
Hi
To pass the list of ids from one page to another we use the query string with pagereference statement.
like this return (new pagereference('/apex/mytestpage?cityVal='+cityValue+'&locationVal='+locationVal).setredirect(true));
Instead of passing individually can we passa list variable
List<String> params = new List<String>();
params.add(cityValue);
params.add(locationVal);
then i pass this list in query string there in next page i get this id and split the values then i use.
Is this possible?
Hi SFDC_Learner,
Yes you can pass the list in the query string. You can use JSON serialize methods and pass the json string to the query string. Then on the next page, you just deserialize it back to the original data type.
-Hengky-
All Answers
Hi SFDC_Learner,
Yes you can pass the list in the query string. You can use JSON serialize methods and pass the json string to the query string. Then on the next page, you just deserialize it back to the original data type.
-Hengky-
Thanks. this is very good sample.
How can we pass the same through script??