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
IndianIndian 

URL ISSUE WITH '&'

Hi everyone, 

i have issue with '&' in the page reference URL.

i have  custom objects called A and B. 

object A name : Test & Plan.

i have overwritten the New button in object B.

when i create object B from Object A, its referencing the object A in the URL. 

if the Object name contains '&' or any other special charaters its skiping the below line.

 

 

pageRef = new PageReference('/a0R/e?&Name='+defaultname+'&CF00NE0000000PlaB='+mName+'&CF00NE0000000PlaB_lkid='+objectId+'&retURL='+retURL+'&RecordType='+recordType);

 

mName is the Object A name.

 

any inputs will be helpful.

need to resolve this ASAP. 

thanks in Advance.

Best Answer chosen by Admin (Salesforce Developers) 
IndianIndian

i got the solution. 

instead of using Name of the object A i used id of the record. 

 

thanks