You need to sign in to do that
Don't have an account?
KathyQ
s-control for clone oppt
Hello,
Has anyone had to mimic the clone button on an opportunity? It is a standard button. We have no access to the s-control source code. We wanted to replicate the clone button with a minor modification to populate a field that captures the opportunity number / name of the original deal. We were hoping to get a code snippet rather than re-invent the wheel.
Many thanks!
Kathy
Has anyone had to mimic the clone button on an opportunity? It is a standard button. We have no access to the s-control source code. We wanted to replicate the clone button with a minor modification to populate a field that captures the opportunity number / name of the original deal. We were hoping to get a code snippet rather than re-invent the wheel.
Many thanks!
Kathy
https://www.salesforce.com/appexchange/detail_overview.jsp?id=a03300000036TtfAAE
you basicaly do this :
query into an sobject, the record using all the fields that are not readonly
remove the ID from the sobject
pass this same object to sforce.connection.create()
if you do this simply, you don't get the related objects ( deep clone) , but it sounds like you don't want that.
here are some snippets
Code:
Message Edited by Ron Hess on 07-26-2007 04:46 PM
http://ideas.salesforce.com/article/show/70003/Clone_API_Call
Your clone() tip was very useful.
My preference would have been to use Apex. However, the Apex clone() method does not take the Id of the orginal object as the input.
Is there any way in Apex to obtain an object (Opportunity) given its Id?
Andi Giri