You need to sign in to do that
Don't have an account?

Using Replace function did not work????
How would one replace the ampersand in this:
R & S
so in an url for salesforce to pick it up it comes in as:
R+&+S
I tried:
String abc;
abc = c.name.replace('&', '+&+');
That did not work...
I am overriding a URL...
I just tried this and it worked:
String s = 'R & S'; s=s.replace(' & ', '+&+'); System.debug(s);
Try this:
encodingUtil.urlEncode(myString, 'UTF-8');
Hi mmaxtra!!
You could use:
abc=c.replace(/&/g,'+&+');
When you use /g you are making a global replace so each & that is found in a string will be replaced
See you