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
Raghavendra ARaghavendra A 

Copying Data from one object to another

Hi All,

I am writing a module to copy the data from all fields from one object to another object. Source object is a object from a Managed Package. We have X amount of field. Destination object is just a object to store that data temoporarily. Destination object will have all Text fields to store the data. Source will have different types of data fields. 

I need a sample code to copy the data from source to destination. More importantly I should be able to customize the field mappings easily. When we create new fields, we should be able to easily customize the list. And the Query has to be generated by readint the mapping. 

There will be few more related objects to be copied and store in few other temporary related objects. 

Any help would be highly appreciated!

Thanks,
Raghu