Questions tagged [clone]

copy details/field values from one object to another

Filter by
Sorted by
Tagged with
19
votes
6answers
18k views

Deep Clone (Parent -> Child -> Grand Child)

I have a requirement to deep clone (Parent -> Child -> Grand Child) records by clicking a button at the Parent Level. I believe Salesforce supports only Clone at the Parent Level, it does not have ...
36
votes
7answers
26k views

Copying metadata and code from one Production org to another

How do I copy(for want of a better word) metadata (i.e. Objects, Workflows, Validation rule etc), and code (Apex, Visualforce, Triggers) from one Production org to another production org? Is this ...
9
votes
2answers
6k views

Cloning a Wrapper Object in APEX

public class controllerName { public class WrapperClass { public CustomSObj__c custom {get; set;} public Boolean bool {get; set;} public WrapperClass(CustomSObjc__c custom) ...
2
votes
2answers
487 views

Trigger for cloning isn't required for data loading

I have a 'Before Insert' trigger that was developed only because of the 'clone' functionality in SF. In our Managed Package if someone clones our custom object there are a number of fields that we ...
5
votes
1answer
6k views

Clone list of SObject records using deepClone() to clone all the fields on records

I am trying to clone the records of a custom object. I know that I can use the deepClone() method of the List class to do this. List<MyCustomObject__c> originalList = [Select Id, Name, Age From ...
1
vote
1answer
764 views

Replicating Clone Case Function/Action using Workflow

I'm new to Salesforce and I want to have a trigger to automatically clone a case as a new case. Example, the case has been closed and the customer replied to email, I would like to keep that case ...
1
vote
1answer
439 views

DUPLICATE_VALUE error when inserting a deep cloned record

I'm writing a method that has to insert a clone of a given record of Object__c. I'm obtaining the clone performing a deep clone. That is: object.clone(false, true, false, false) The insertion of ...
0
votes
2answers
2k views

Custom Clone button on Quote, copies few standard fields but not all, why?

I have a custom button, which i m using to clone Quote Object. I'm using javascript with ajax tool kit, Like in this post. i can clone the quote with few standard fields, but not all, for e.g, ...
0
votes
2answers
1k views

How To Clone Opportunity With Extra Related Custom Objects

Each Opportunity in our Salesforce system may have zero or more related Opportunity Items which are custom objects. The relationship and use of Opportunity and Opportunity Items is like Orders and ...
-2
votes
1answer
164 views

Custom Clone of specific fields only using the standard form in VF [closed]

Is there a way to clone specific fields and save only when the save button is click? Only five fields should be cloned, assign new value to one field and the rest of the fields are empty. below is ...