+ Start a Discussion
sessusessu 

Hi

Hi! I need to convert custom object fields to another custom object fields. from enquiry form object to student object . please help me to write a code for this
SFDC_EvolveSFDC_Evolve

Did not get ur question . Could u please explain it 

sessusessu
HI Thanks for the earlier reply I have created two custom objects admission form and Student. i need to map fields from admission form to student object. please help me to write a class for this.
Mani PenumarthiMani Penumarthi

means,

you want to save records of admission to student?

right?

sessusessu
yeah i want to save records of Admission to student object. I have written a code as it doesn't show error but still not working public class CMyController { Public Enquiry__c abc= new Enquiry__c(); public CMyController(){ Enquiry__c abc = [select Id,First_Name__c from Enquiry__c where id = :apexpages.currentpage().getparameters().get('id')]; } public pageReference doCreateStudent(){ Student__c newacc = new Student__c(); newacc.First_Name__c = abc.First_Name__c; insert newacc; pageReference p = new pageReference('/' + newacc.id); p.setRedirect(true); return p; } } Please help Its displaying an error List has no rows for assignment to SObject