function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Tejas Wadke 5Tejas Wadke 5 

How to add spaces in url


I want to add a space between firstname and lastname.
I tried using %20 in an apex trigger but it does not accept the '%' and gives an error 'no viable character'.''&fullname='+con.firstname+%20+con.lastname
Please help me on this.
Mani RenusMani Renus
Can you try this one
'''&fullname='+con.firstname+'  '+con.lastname
Rajiv Penagonda 12Rajiv Penagonda 12
See this ( link. Example below:
String lStrParams = EncodingUtil.urlEncode('FIRST_NAME LAST_NAME', 'UTF-8');
String lStrURL = '' + lStrParams;