copy details/field values from one object to another

learn more… | top users | synonyms

0
votes
1answer
39 views

Cloning on trigger is inserting record twice

we have a approval system and when every step is approved it updates Revision number. There is a trigger on the change of Revision Number, which is responsible for cloning the the existing record and ...
0
votes
1answer
41 views

Trigger to clone object is throwing error

Apex trigger is throwing following error when tried to clone the record, Although there is no id inserted but still I'm getting complain about id. **Validation Errors While Saving Record(s) There ...
0
votes
1answer
20 views

How to clone related records

I have 2 custom objects, object1(Parent) and object2(Child), i want a clone button on object1 so everytime i clone then it needs to carry over records from object2. I created this button but it ...
1
vote
1answer
54 views

Clone Dashboard with Reports

I have to clone a dashboard for multiple markets (say I have to clone a dashboard aimed at France for every country in Europe). This dashboard has about 10 underlying reports with the same filter ...
1
vote
1answer
64 views

Clear the contents of a lookup field when cloning a record

An interesting question was asked about clearing the contents of a custom lookup field when URL hacking the clone button on an opportunity. The question was deleted by the asker, but the behavior is a ...
1
vote
0answers
69 views

How to clone child records on any object with url content using standard clone button

i have tried to search a lot but not getting any solution for my problem. I would like to clone a parent object by clicking the standard clone button(Because all the fields are already prepopulated by ...
0
votes
1answer
51 views

Copying over of related lists

I have the following set up: Custom Object : Contract Custom Object: Address Object : Opportunity This is my process in the application: When a new Contract is created, a renewal Opportunity is ...
0
votes
1answer
315 views

Create custom Clone button for Quote object

I have created a custom Clone button for the Quote object to clone a quote and update the record type of the new quote. The button clones the quote with the current Record Type of the record it is ...
0
votes
1answer
116 views

Populate case clone field with email body - EmailMessage Trigger

This will be my first Apex trigger. I want to create a new case (by cloning another) when an email is sent to a case with Status = Closed. I've taken some code from a previous Stack Exchange thread to ...
0
votes
2answers
169 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
2answers
280 views

Deep clone parent and children without using Apex - possible?

I've seen some tools like Super Clone that can do deep clone (aka clone child records), but what I am looking for is a tool that clones record and then reparents the child records. I've seen there ...
2
votes
3answers
294 views

Summer 14 and Price books

Since Summer 14 released this weekend every time I try and clone a product I get the below error message and I don’t understand what its saying? I think something changed with the price book in the ...
3
votes
3answers
389 views

Clone Account without cloning opportunities

I am testing out cloning an account, but I would like the system to not clone some to the objects/fields. For example, I would like the clone button to clone the Address, phone and other info but not ...
2
votes
1answer
137 views

How to Clone records on a pageBlockTable via Button

I'm very noob with apex and VF. My problem is: I've a pageBlockTable that shows a list of record from a Custom Object. Now I've a column of the table on which there's a button ("Clone") that should ...
8
votes
2answers
445 views

How to “deep clone including Attachments” without hitting the heap space governor limit?

I'm working on a "deep clone" Visualforce page where starting from an object, that object and its child objects and its grandparent objects and so on are cloned and that logic works fine. But any ...
1
vote
1answer
1k views

Best approach to cloning records with rollback

I have the below code which works well to clone a case record. In this scenario, we want to insert a new case and save it. But I have a new request to create sort of a quick case where we would only ...
1
vote
2answers
2k views

Updating original object using trigger after update

I have the below code, which works, but I'm a little concerned that I'm calling a method in a loop, which performs a query. Basically, the trigger looks to see if the field Auto_Close_Reopen__c is set ...
1
vote
1answer
306 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 ...
2
votes
1answer
225 views

Copy picklist field when cloning an object

I'm using Apex to update the value of a field in an existing record for a particular object. I got it to work by changing the existing record and upsert it. The catch is I don't want to overwrite ...
1
vote
2answers
246 views

Milestones PM Clone a Project Template from a Trigger

We have created a Project Template and need to be able to clone it when an opportunity stage changes to Closed Won. I have started a Trigger on the Opportunity object after update that checks the ...
2
votes
2answers
1k views

Database.query() default sort order

Does a Database.query() result maintain the order of the WHERE clause list I'm searching by? List<Id> myList = new List<Id>; myList.add('My Opportunity 1'); myList.add('My Opportunity ...
3
votes
3answers
387 views

Clone sObject field values from Wrapper class

I have created one wrapper class with sObject and index for sObject and im getting and setting list of wrapper to show on VF page. On VF page im showing some fields from that sObject and provided one ...
1
vote
2answers
236 views

Is it possible to Clone a quote belonging to an account into a separate account?

We already have the ability to clone a quote, but currently it can only clone the account within the same account in which it already belongs. I.E. Is it possible to clone the quote belonging to ...
0
votes
2answers
2k views

What is the quickest way to clone a custom object and make it a child\detail to another custom object?

I am trying to essentially re-create a custom object and then make the new copy a child to the original object. What is the quickest way to do this ? I have looked into it on App Exchange but it ...
5
votes
2answers
2k 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) ...
1
vote
1answer
420 views

How to clone an Opportunity with null required fields

I would like to Clone an Opportunity with required fields (enforced by validation rules) which have not yet been populated. It is therefore giving the users an error when they attempt to Clone on that ...
8
votes
5answers
5k 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 ...
0
votes
1answer
162 views

object Name being replaced with object ID

So, the relevant snippets of code are: function doFunction(choice) { switch (choice) { case "changename": ...
2
votes
2answers
336 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 ...
4
votes
5answers
1k views

Clone SObject Relationships

Is it possible to use a database query to get a set of related records and clone them into new related records. sObject[] sObjectsWithChildRelationships = [SELECT Id, (SELECT Id, myObject__c FROM ...
19
votes
6answers
11k 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 ...