How to copy one set of field values to another set of fields in a custom Visual force page.
|Knowledge Article Number||000175607|
Customer would like to know how he can copy one set of field values to another set of fields in a custom Visual force page?
Follow the steps given below:
public PageReference copySameAddress()
if(objEmp.Address__c != null && objEmp.Address__c != '')// i am assuming that this is text field
objEmp.Address_C__c = objEmp.Address__c;
// put remaining fields the same way as put above.
// last if you want to update the same thing in the database at the click of the button just add this statement commented below
// update objEmp;