You need to sign in to do that
Don't have an account?
redirect from vf page on save
Hi all, I need to redirect from a customvf page to another when the save action has occurred. It is a custom object and the normal save is working fine but i need this redirect. I found this example on the boards which has been marked as the solution but when i try to use it it tells me :
System.NullPointerException: Attempt to de-reference a null object
Class.SISEdit.saveandnotes: line 50, column 1
Anyone got any ideas whats up?
public PageReference saveandnotes() {
controller.save(); // This takes care of the details for you.
PageReference ProgressNotes = Page.PN;
ProgressNotes.setRedirect(true);
return ProgressNotes;
}
This error occurs when you used the object / list without initializing or assign a value to value which is null.
Check the code in save method and assure you are initilizing the object/list before using.
post the save method code if it doesn't help.
All Answers
This error occurs when you used the object / list without initializing or assign a value to value which is null.
Check the code in save method and assure you are initilizing the object/list before using.
post the save method code if it doesn't help.
Thanks realised that i wasn't initialising it properly.
Thanks again.