You need to sign in to do that
Don't have an account?
how to rectify UPDATE ERROR
Below code i got some error.Please modify and send the code
public class EmployeeRelatedList {
private Empolyee_Details__c empDetail;
//private Apexpages.StandardController controller;
public EmployeeRelatedList(ApexPages.StandardController stdController) {
//controller = stdController;
this.empDetail = (Empolyee_Details__c)stdController.getRecord().id;
}
public Pagereference save() {
if(id!= null){
try{
insert empDetail;
return new Pagereference('/apex/Custom_pagenations');
}
}
else{
update empDetail;
here i got error
}
catch(Exception e){
Apexpages.addMessage(new Apexpages.Message(Apexpages.Severity.ERROR, e.getMessage()));
return null;
}
}
}
THANKS
RANGA
All Answers
Your code is not clear...could u please tell me exact functionality of this class...