function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nagarjuna Reddy NandireddyNagarjuna Reddy Nandireddy 

HOW TO REDIRECT THE PAGES BY USING BUTTON?

HI All,
I have three buttons i.e save,next and previous in a page with fields
in that three buttons  if 'next' will fire than page will redirect to next page  and 'previous' button will fire than page will redirect to previous page. 
in page redirecting manner we will fill up some data into fields. in that data will not be erase. at the time of page redirecting finally all pages data will fill than save button will fire.
at the time of save button will firing in that time record will be save.
please help me with code.........
Pankaj_GanwaniPankaj_Ganwani
Hi,

Please refer below mentioned code snippets:
 
public pagereference previous()
{
        PageReference reference=new PageReference('/apex/previous');
        reference.setRedirect(false);
        return reference;
}

public pagereference next()
{
        PageReference reference=new PageReference('/apex/next');
        reference.setRedirect(false);
        return reference;
}

public pagereference previous()
{
        insert object;
        return NULL;
}