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
Semira@gmail.comSemira@gmail.com 

URL hacking via apex

Hi I have a custome clone button which will take the user to a visualforce page. However, everytime I try to save the record and open in Edit mode, I noticed the URL still says Clone = 1 even though I speficially assigned an url. Please help. 

Here's the URL :

User-added image

This is after I have saved the record. 

In my Pagerefence I have assigned the new record ID to refresh the page and route user to the correct page. 
pv = new Pagereference('/'+controller.getId() +'/e?&retUrl=%2F'+controller.getId())

This should save the record and take the user to edit page of the newly created record. However, I see the URL still have the Clone = 1. 

How do I get rid of this? Please help. 
 
ShikibuShikibu
http://salesforce.stackexchange.com/questions/116179/remove-getparameters-from-the-url