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
Stephen FinlayStephen Finlay 

Assembled URLs now failing if they include a tokenised value ( CipherCloud )

Since Saturday, the Apex class that assembles a URL to be assigned to a button on a VF page is failing to return a value if the string includes a tokenised value. ( We are using the CipherCloud tokenising gateway )

For example, the following piece of code returns nothing at all if the result of aContact.Name would be a tokenised value.

selectedinteractionurl= 'a02/e?CF00N90000007GAuz='+latestcall[0].Name+'&CF00N90000007GAuz_lkid='+latestcall[0].Id+'&CF00N90000005GWKP='+aContact.Name+'&CF00N90000005GWKP_lkid='+aContact.Id+'&retURL=/apex/CallerInteractions?id='+aContact.Id+'&renderToolbar=true';

If aContact.Name returns a non-tokenised value, then it works fine.

This was all working fine until last Saturday.
Best Answer chosen by Stephen Finlay
Vamsi KrishnaVamsi Krishna
does the token has any special characters ? can you try adding url encoding on the contact name and include that in the URL

selectedinteractionurl= 'a02/e?CF00N90000007GAuz='+latestcall[0].Name+'&CF00N90000007GAuz_lkid='+latestcall[0].Id+'&CF00N90000005GWKP='+EncodingUtil.urlEncode(aContact.Name, 'UTF-8')+'&CF00N90000005GWKP_lkid='+aContact.Id+'&retURL=/apex/CallerInteractions?id='+aContact.Id+'&renderToolbar=true';

reference :
http://help.salesforce.com/apex/HTViewSolution?id=000057334&language=en_US

All Answers

Vamsi KrishnaVamsi Krishna
does the token has any special characters ? can you try adding url encoding on the contact name and include that in the URL

selectedinteractionurl= 'a02/e?CF00N90000007GAuz='+latestcall[0].Name+'&CF00N90000007GAuz_lkid='+latestcall[0].Id+'&CF00N90000005GWKP='+EncodingUtil.urlEncode(aContact.Name, 'UTF-8')+'&CF00N90000005GWKP_lkid='+aContact.Id+'&retURL=/apex/CallerInteractions?id='+aContact.Id+'&renderToolbar=true';

reference :
http://help.salesforce.com/apex/HTViewSolution?id=000057334&language=en_US
This was selected as the best answer
Stephen FinlayStephen Finlay
Ok thanks Vamsi, that does appear to have fixed the issue.

I am just wondering why I am needing to do this encoding now? The original code worked fine last week ( and since mid-March when I first deployed it )

Have Salesforce changed something over the weekend?
Vamsi KrishnaVamsi Krishna
Stephen,
I cannot think of any particular reason.. but it could be simply the token cipher values didn't had any special characters so far and u hit the first one today.. :-)
Stephen FinlayStephen Finlay
It has been in use as it is since early March, but I wonder if the people looking after the CipherCloud gateway changed something over the weekend that altered the encoding. Will investigate and thanks again for your help, now have a solution that seems to be working fine.