copy details/field values from one object to another

learn more… | top users | synonyms

0
votes
0answers
66 views

OnClick Javascript in custom button is opening in new window instead of tab on initial click in Chrome

I am having an issue with some onClick javascript that I need to open in a new tab in Chrome. I am using an Apex Class to generate a URL and then opening that URL inside the javascript. Here is my ...
1
vote
1answer
94 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
85 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
64 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
86 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
1answer
72 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
404 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
277 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
133 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
559 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 ...
4
votes
2answers
916 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
226 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 ...
6
votes
4answers
3k 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
134 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
252 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
805 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 ...
14
votes
6answers
6k 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 ...