You need to sign in to do that
Don't have an account?

save functionality not working
Hi friends,
I am unable to save a record with the following code. Please help
-------------Controller------------------
public with sharing class personAccController {
ApexPages.StandardController con;
public personAccController(ApexPages.StandardController controller) {
con = controller;
}
public pagereference redirect(){
con.save();
pagereference ref= new pagereference('/apex/personaccpage');
ref.setredirect(true);
return ref;
}
}
---------------part of page----------------
<apex:pageBlockButtons > <apex:commandButton value="Save" action="{!save}"/> <apex:commandButton value="Save&New" action="{!redirect}" /> <apex:commandButton value="Cancel" action="{!Cancel}"/> </apex:pageBlockButtons>
Have you added an apex:pageMessages tag to see if there are any validation errors etc?