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
dv4dv4 

Clone Quote

I have added a clone quote button on Quote. On this button, I have added :

 

{!REQUIRESCRIPT("/soap/ajax/22.0/connection.js")}
result = sforce.connection.query("select id,opportunityid from Quote where id = '{!Quote.Id}'")
window.top.location.href =
    "{!URLFOR( $Action.Quote.NewQuote ,null,[clone=1,id=Quote.Id,retURL="/"&Quote.Id],true)}&oppid=" +
    result.records.OpportunityId

 

This successfully creates a clone of current quote but it doesnt copy custom field values of quoteline items in my clone quote. Any suggestions on how to fix it?

 

Thanks

itsabsoluteitsabsolute

I haven't tested this with your scenario, but in the past I've been able to use the GET parameters on the URL. 

 

Here is a good description on how to do that, you would need to alter your script with your custom field references as described.

 

http://stackoverflow.com/questions/5334585/custom-button-to-copy-data-from-opportunity-into-a-related-custom-object