folks stucked with the issue where we are exposing visualforce page to the third party application and where on button click on third party application it will redirect to salesforce through single sign on.meanwhile passing paremeters to salesforc the url like below htpps://domaainname/apex/pagename?param=param1&returl=value&param2=value2&param3=value3 but once redirect to salesforce url is breaking and redirecting to the below url htpps://domaainname/apex/pagename?param=param1 not able to find the debug logs why the url is trimming can some one help me what may be the root cause for this any firewall is not allowing??


Not an explanation of why, but here is a clean workaround, revolving around passing the parameters in as a singular, encoded parameter, ex.


If it's static, a Google search for "URL encoder" will give you a tool to generate the URL in this format. If it's dynamic, just use the Javascript method encodeURIComponent().

This could also be performed in Apex using the action parameter on the page, but this seems more practical to me.


// to be placed at the very top of the <apex:page/>
    var url = window.top.location.href;
    var key = '?param='
    var params = url.substring(url.indexOf(key)+key.length,url.length);
    window.top.location.href = url.substring(0,url.indexOf(key)+1) + decodeURIComponent(params);
  • its a managed package visualforce page and dont have the access to edit – Subbu Mar 13 '19 at 6:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.