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
NTNT 

error in overriding a clone button

Hi All,

I am overriding a clone button by a sControl of a custom object and setting a url. This url is same as the real Clone button shows.
But on my buttons click the page goes in infinite loop and calls again and again the same url.
My sControl code is.....

function initiateClone()
    {
        var URL = "/"+Id+"/e?clone=1";
        var saveURL = "&retURL="+RetURLQueryString;
        URL = URL+saveURL;       
        window.parent.location.href = URL;
    }

Thanks
Nitin Gupta

ShamSham
I suppose you have overridden the clone to do some custom logic and open the native salesforce page.
then var URL = "/"+Id+"/e?clone=1" append parameter "&nooverride=1";


NTNT
Hi Sham,

If i use nooverride=1 then record is not cloning but opens in edit mode.....