function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
micwamicwa 

Clone: Opportunity deep clone

I would like to clone an opportunity including products. If I do the following call:

 

Opportunity cloneOpp = myOpp.clone(false, true);

 

 Not all the fields are copied and also none of the products. Has this something todo with RecordTypes? But even if I set the Recordtype manually (because otherwise it takes the wrong one) it doesn't work.

 

Any idea?