Activity Forums Salesforce® Discussions How to pass special characters in URL?

  • Prakhar

    Member
    April 26, 2016 at 7:58 am

    Hey,

    You can use formula {!URLENCODE(text)} in your script and replace the text value with the merge field or text string that you want to encode.

    Hope that it solves the issue.

    Thanks.

  • Parul

    Member
    September 20, 2018 at 1:10 am

    Hi,

    String url="http://localhost:8080/safp/contacts/FirmAddress.do?btnAction=FirmAddress&firmId="+URLEncoder.encode("122379069","UTF-8")+"&strLocation="+URLEncoder.encode("!@#$%^&*()_+","UTF-8")+"&async=true&newAccID=112";

    Use URLEncoder.encode()

  • shariq

    Member
    September 20, 2018 at 7:24 pm

    Hi,

    Just Encode using standard EncodingUtil class of salesforce to do it.

    Hope this helps.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos