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
JerryJosephJerryJoseph 

inserting values

i created a new custom object.. i need to move the data in some fields of an existing custom object to this new custom object.. how do i do that programmatically??
MVJMVJ
i would use the data loader.  Oull the data out of the one object and then load it iinto the new object.
reshmareshma

If your custom object is xxx

you could refer it programatically as xxx__c

so sample program to retrieve if update is a field in it

 

public class HelloWorld {

public static void addData(xxx__c[]  x){

for (xxx__c xx:x){

x.update__c = 'World';

}

}

}

 

Instead of World refer to the objects data you want to store in this particular object