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

URL Hacking



I have a requirement where I need to customize cloning.


For that I created a custom button and did URL hacking which worked.


But I had a requirement because of which I had to override the Clone page with a custom VF page.

Now the URL hacking is not working.


Please suggest a workaround for this




I assume you mean you added clone=1 to the URL? Once you go to a VF page, that parameter is useless. You'll have to detect the parameter (i.e. ApexPages.currentpage().getParameters().get('clone')), retrieve the record if it exists (standard query), then use the clone() function of SObject to create a new copy in memory that doesn't have an ID.