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
RAMA KANTHRAMA KANTH 

URLENCODE in javascript not Working what I expected

Hi all,
I am Trying to use a custom button, in that code we have 
sforce.apex.execute( "CaseCreationForET","ETCaseCreation",{caseSubject:"{!URLENCODE(Case.Subject)}",caseDescription:"{!URLENCODE(Case.Description)}"} );    

Here caseSubject Is passeed as a string to APEX method as Below and inserted the case with same subject

 Case csobj = new Case();
 csobj.Subject=caseSubject;
 insert csobj;

but orignal case Subject is as :: Request for issue ticket
and Newly Created case Subject as :: Request+for+issue+ticket

why the subject field is changed in newly created case

Please let me know if there is any way.
 
Thanks.
Best Answer chosen by RAMA KANTH
SandhyaSandhya (Salesforce Developers) 
Hi,

Try to use 
{!URLENCODE(URLENCODE(Case.Subjec))}

Please refer below link for the same

http://salesforce.stackexchange.com/questions/4074/proper-urlencoding-of-spaces-in-formulas-syntax

Hope this helps you!

Please mark it as Best Answer if my reply was helpful. It will make it available for other as the proper solution.
 
Thanks and Regards
Sandhya