+ Start a Discussion
David BinsteadDavid Binstead 

Invalid Page Redirection Encoded URL

I have a Visualforce page with a flow embedded. When the flow finishes I need to pass some flow variables into a new VF page.

When I do, I get the error:

"Invalid Page Redirection The page you attempted to access.....etc"
I've narrowed it down to fields that have spaces or symbols such as a plus sign
i.e phone number:
+49 894 5560519

I am using the function urlEncode, and it is encoding the url as such:
phone number-


Works fine when it's not using special characters. :

Here is a section of the code:

PageReference prRef = new PageReference('/apex/NISUpdateAccountContact?');
string test = EncodingUtil.urlEncode(flowITDB_Please_provide_the_phone_number_FCm_customers,'UTF-8');

return prRef;
Tony TannousTony Tannous
Dear David,

can you try to pass the salesforce Id as the only paramater to the VF Page ,

and in the VF page controller you can select all the data that you need.

David BinsteadDavid Binstead
HI Tony,

Yes I can, that works fine. However, I need to pass other values in the url as well to work as part of a broader piece.

Tony TannousTony Tannous

can you try this :

string phoneCustomer= EncodingUtil.urlEncode(flowITDB_Please_provide_the_phone_number_FCm_customers,'UTF-8');
PageReference prRef = new PageReference('/apex/NISUpdateAccountContact?PhoneFcmCustomers'+phoneCustomer);


Good Luck