I have a custom page. When I on click save button it does not save anything. Is there anything wrong with my code that I could not find? Thanks
public PageReference save() {
if(controller.save() != null) {
PageReference congratsPage = Page.pitu3;
congratsPage.setRedirect(true);
congratsPage.getParameters().put('id',controller.getId());
return congratsPage;
}return null;
}
controller
is the StandardController, one reason might be that there is a data validation error on the save. Make sure you have anapex:messages
in your Visualforce to see the error output. This is only relevant to thecontroller.save()
returning null path.