copy details/field values from one object to another

learn more… | top users | synonyms

4
votes
1answer
71 views

Opportunity standard Clone button. How to detect cloned record in an Apex trigger?

I have spent hours on it but haven't been able to figure out anything. The idea is simple: User clicks on standard Opportunity clone button. User selects either 'Clone without products' or 'Clone ...
1
vote
2answers
25 views

While cloning the Opportunity, is it possible to copy only certain field values?

While cloning the Opportunity, is it possible to copy only certain field values. I want some fields to be empty whichmeans it should not contain the existing opportunity value. Thanks
0
votes
0answers
29 views

External id field is not populating when cloning a sobject record

I have used object.clone() here and then changed some field values. All the changes are reflected in the cloned record except not able to populate External Id field which is concatenation of two Id ...
0
votes
0answers
22 views

Update fields after clone in apex batch class

I have below code where I need to clone a record but change some of it's values. When I try that, it simply seems to do no change on newly cloned record. Can someone let me know how to achieve it? My ...
0
votes
1answer
27 views

Clone record with changes in few fields

I have below execute method of an apex batch class where I need to clone Question_Response_vod__c records of existing with changes in few fields. Can someone please guide me here. I have in code to ...
1
vote
1answer
47 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
64 views

APEX: Assigning a Campaign Id to Campaign Members Issue

I am trying to reassign the campaignid of some existing campaign members by creating a clone of them and inserting them afterwards. Firstly I have the following 2 observations: the hardcoded ...
0
votes
0answers
53 views

Clone function causing issue in Trigger

I have an Apex Trigger on Account. Supported events are before insert, after insert, before update, after update. When I clone an Account, the trigger doesn't seem to invoke before insert or after ...
0
votes
1answer
54 views

How to clone parent SObject to child SObjects with field restriction

I have a requirement where I have to clone a parent Product2 to all of it's child Product2s. I know we can achieve this by using clone() function of Product2, but I want some field values should not ...
0
votes
0answers
41 views

Opportunity Clone with Contact Role

I have a custom clone button for Opportunities with line items. Blanks some fields, pre-populates some others. Is there a way to include the existing Contact Roles so i don't lose them? My users are ...
0
votes
1answer
80 views

How to clone a record in satandard Opportunity object with its related list

I have created a apex class to clone a record with its related list. The record is cloned with related list but I am facing some issue. Those are: 1)after the click of clone button the record is ...
0
votes
1answer
28 views

Clone custom object record via Salesforce1

I want to clone a custom object's record via a Salesforce1 chatter action. But for some reason, for that particular object there is no "Clone" action available. However, I have another custom object ...
2
votes
1answer
26 views

Cloning of lead records

Is there any way to find the parent of the cloned record? I have a lead record which should be cloned and i should be able to identify the lead record from the cloned new lead.
1
vote
1answer
44 views

Null Pointer Exception on a cloned sObject

I am cloning a custom sobject inside a 'before update' trigger and updating the values for some of the fields on the cloned sObject. However when I run the code, it throws a NullPointerException. ...
-1
votes
1answer
91 views

Editing related list while cloning record

I am trying to Clone account detail page with contact related list using Custom button which redirects to VF page.I am able to clone detail page with contact related list,but On clicking 'Add row' ...
1
vote
1answer
37 views

Profile cloning and access settings on new profile

Is there any way to clone profile and allow that profile to have all field level access as previous(parent) profile? Scenario is, we haven't set some objects/fields as global on OWD, now when we ...
0
votes
2answers
177 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, ...
5
votes
1answer
69 views

Apex Bug (?) Null Field Values of Cloned Instances Don't Persist?

I want to take the state of a source record, clone it, and apply the clone to a target record. But I'm encountering an issue in which a null field on the clone does not nullify the field on the target....
1
vote
2answers
37 views

Strange error on product clone

Anybody seen errors like this before? Any fixes? I'm expecting this to be something deep down in the Salesforce platform and not something I've done but any guidance appreciated. (I notice Sneezy has ...
2
votes
1answer
106 views

Cloning records from 1 object to another object

I have 2 different objects objA and objB with same object model(all the fields api name and no of fields are same). Now when a change happens I want to clone the same records from objA to objB. It is ...
1
vote
0answers
75 views

Unable to cover Clone() method in test class

I'm having a simple code where I'm cloning an opportunity object with the necessary child elements. When I'm wrirting a test class for it, the clone method is not called and it is going into catch ...
0
votes
1answer
52 views

Issue with cloning a parent Item that has 50+ children

In the below function, the line Item__c newIt = it.clone(false,true,false,false); throws an error System.QueryException: Aggregate query has too many rows for direct assignment, use FOR loop. This ...
0
votes
1answer
41 views

Is there any way by which we can clone managed package objects or fields?

I want to uninstall managed package. Is there any way by which we can clone managed package objects or fields?
1
vote
1answer
148 views

How to Clone/Copy Standard page for Accounts

I want to built certail function which seems not possible by creating custom fields in acounts....so wanted to know if it is possible copying or cloning the Acounts page so that i can build my custom ...
1
vote
1answer
157 views

Cloning Quote Line Items - multicurrency

I am trying to clone quote with line-items with multiple currency enable. When I try cloning with out line items it is working fine.As I can see multiple currency is enable line items have different ...
1
vote
0answers
234 views

Cloning an Opportunity record

I have successfully created a button that I am using for "renewing" an opportunity record. The custom button uses a URL hack to set certain values. One of the values it sets is putting the name of the ...
0
votes
0answers
38 views

Work flow field update after clone: works for SysAdmin but not for other users?

What I am trying to accomplish: after an object has been cloned, via the standard Clone button, a custom field 'version number' must be incremented. I want to accomplish this via work flow and I got ...
0
votes
0answers
89 views

How can we add Cloning option of Notes/Attachments when cloning Opportunities?

We would like to Clone Opps, currently it asks if we would like to clone with or without Products, but we need it to also ask if we would like to clone the notes/attachments. How can we achieve this ...
0
votes
1answer
122 views

How can i clone record use deepclone() method and update clone recorded id with its related list?

The problem arising clone recorded id does'not updated so and does'not appear related list and updated field so how should i do this? Apex class Public Class CloneVersionwithTextController{ Public ...
1
vote
3answers
753 views

Clone (Parent -> Child ) record with its related list using list button?

I have a requirement to clone (Parent -> Child ) records by clicking a button at the Parent Level with its realted list. I believe Salesforce supports Clone at the Parent Level, it does not have Clone ...
1
vote
1answer
93 views

Can the pricebook be changed when cloning an opportunity with product?

I have a location field on Opportunity which is tied up with a pricebook. If I clone the Opportunity with products, it won't allow me to change the location because it's associated to that pricebook. ...
2
votes
2answers
170 views

Salesforce cloning and integration

We have multiple salesforce orgs for multiple non profits. All of them need to have same functionality but different organization. Is there a way to clone all these organization? If I make changes, ...
1
vote
1answer
63 views

Does deep cloning also create new parent record?

I am running below code Account a1 = new Account(name='a1'); insert a1; Account a2 = new Account(name='a2', parentId = a1.id); insert a2; Account a3 = new Account(name='a3', parentId = a2.Id); insert ...
2
votes
0answers
29 views

What are all the possible entry points for cloning a record?

In an org I have worked on, we needed to stop users from being able to clone a custom object record. (it just doesn't fit the business logic). To do this, I removed the "Clone" button from the page ...
0
votes
1answer
50 views

URL Redirect not working for specfic record

I have a custom button on oppty which when clicked is redirected to a VF page. The page clones existing fields and presents an edit window with prefilled fields to the user. The button works fine for ...
2
votes
2answers
102 views

Error when I try to clone an object

I'm trying to clone an object, here is the code: @RemoteAction global static void cloneRow(String idProj){ System.debug('@@ clone: '+idProj); ConfigeroPSA__Expense__c oldExp = [SELECT Id,Name,...
0
votes
0answers
230 views

Deep Clone Test Class not finding newly created record

I have a deep clone class that is called from a VF page. The class executes perfectly, I just cannot get my test class to work properly. I'm trying to verify that the cloned record is created within ...
1
vote
1answer
50 views

how to handle unique fields while cloning?

I have developed below code fro cloning but unfortunately because of unique field i am getting error of duplication. here one text field set to unique. Apex class: public class ...
2
votes
2answers
117 views

Error inserting TaskRelation records

I have a client who wants the ability to clone a task that has multiple contacts. They would make slight changes to the cloned task (Assigned To, etc) but the multiple contacts would remain the same. ...
3
votes
1answer
674 views

Create Custom Cloning Button - New Admin

I am relatively new to salesforce and administration. I am trying to create a custom cloning button that checks against the user profile name. I am using URL as content source. if({$Profile.Name}="...
1
vote
0answers
97 views

Custom Clone button with ability to validate picklist values for Record Types

We have a custom controller for a custom clone button that also checks whether the picklist values are active on a parent record when a Case is being cloned. If any of the picklist values on the ...
0
votes
2answers
444 views

Custom Clone Button - Default values to blank

I would like to create a custom clone button on the case object that clones all of the case but I want two fields - Escalation_Stats__c, Escalation_2 to default to blank. Below is the code I am trying ...
1
vote
2answers
184 views

Clone an email using the API: the email attribute _AdditionalEmailAttribute1 is not copied (SFMC)

We need your valuable help on SFMC. We have a HubExchange app and a large client (millions of users) is using it and having some serious issues. They have Web Analytics Connector enabled, which adds ...
2
votes
1answer
201 views

Standard Clone Button - Setting Field Values - Custom Button Or Something Else?

Need: Ability to Clone records, and set a value into a field during the cloning. In my specific case, I want to populate either a Lookup field with the ID of the record cloned from (so passing ...
0
votes
1answer
73 views

unable to clear out email field on clone using URL hacking

I am creating a button to clone a contact record, however I don't want to clone the email field, therefore I use the following syntax: /{!Contact.Id}/e?clone=1&retURL=%2F{!Contact.Id}&...
1
vote
1answer
106 views

Field not writable after Database.rollback() and clone()

This is my custom save method: private void saveNewMode() { Savepoint toBeforeState = Database.setSavepoint(); try { insert parent; for(ChildA__c prs : childrenA) { ...
0
votes
1answer
229 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
180 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 ...
1
vote
1answer
285 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 (i.e....
2
votes
1answer
392 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 ...