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
AlexCRMmanagerAlexCRMmanager 

Clone record URL parameters

I have a custom button on the Opportunity record that executes the following s-control:


Code:
function redirect()
{
parent.frames.location.replace('/{!Opportunity.Id}/e—clone=1&retURL=%2F{!Opportunity.Id}&opp3={!Opportunity.Name} - Exam Order&00N50000001MsKI=1&cloneli=1&save=1');
}
redirect();



The problem is that this URL with the "&save=1" parameter updates the existing Opportunity instead of creating a new one. Does anyone know what parameter I need to pass in the URL to make it save a new Opportunity record?

Message Edited by AlexCRMmanager on 05-07-2007 12:36 PM

Greg HGreg H
You need to replace the first {!Opportunity.Id} reference with 006.
Code:
'/006/e?clone=1&retURL=%2F{!Opportunity.Id}&opp3={!Opportunity.Name}%20-%20Exam%20Order&00N50000001MsKI=1&cloneli=1&save=1'

 You should also encode the spaces in your string with either a plus sign (+) or (%20).
-greg
AlexCRMmanagerAlexCRMmanager
Hi Greg,

Thanks for the tip, that made the cloning work correctly. The only problem is that now the "&cloneli=1" parameter doesn't work. I would like to clone the Opportunity Line Items along with the Opportunity. Do you know what I need to pass in the URL string to clone the Line Items?

Thanks,
Alex
AlexCRMmanagerAlexCRMmanager
Actually, the clone doesn't work at all if you use "006", it just creates a new Opportunity without filling any of the fields from the parent Opportunity. How do you access the Clone functionality through a WIL/Custom Link?
GregoryGregory

Alex, did you ever get this working?   I also have a need to clone a record and would like to pass in one new custom field value via a query string, and then have it automatically save with the &save=1.  However when using clone=1 along wiht save=1 seems to only update the existing object.    Did you figure out a solution?

Thanks,
Gregory

AlexCRMmanagerAlexCRMmanager
Hi Gregory,

Sadly, I have not been able to figure out how to get this working. I'm disappointed by the silence of the Salesforce.com employees on this message thread. My assumption is that this problem is either a bug or something that they don't want SFDC administrators to be able to do.

Anyone out there have a solution to help Gregory and I?

-Alex

Message Edited by AlexCRMmanager on 05-30-2007 09:51 PM

Kalyan MedaKalyan Meda
Please try the below 
https://naX.salesforce.com/ <ID> /e?clone=1&retURL=%2F< ID >