답변 1개
Hi Piyush, try with below code. modify the field api Names and object names
If this helps, Please mark it as best answer.Thanks!!trigger testrecordinsert on customer__C (before update) {
List<test_object__c> inserttestrecords = new List<test_object__c>();
for(customer__C ctr:trigger.old){
test_object__c to = new test_object__c();
//you assign the list of fields you want to insert in the object from customer__c object.
to.Name = ctr.name;
to.field1__c = ctr.field1__c;
to.field2__c = ctr.field2__c;
inserttestrecords.add(to);
}
insert inserttestrecords;
}