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
BylithiumBylithium 

Clear the page on reload

The issue which I am having is on saving I am reloading the current page but the feilds are not being cleared.The fileds in the form still have the message entered. i want the fields to be cleared when the page is reloaded

 

how do i do it

I am putting the controller here..

 

public abstract class MyController{
    Apexpages.StandardController controller;
    public MyController(Apexpages.StandardController c){
        controller = c;
    }
 
    public PageReference save() {
        controller.save();//invoke standard Save method
        return Apexpages.currentPage();//refresh current page
    }
}

Best Answer chosen by Admin (Salesforce Developers) 
BylithiumBylithium

got the solution..if anyone needs

 

public abstract class MyController{
    Apexpages.StandardController controller;
    public MyController(Apexpages.StandardController c){
        controller = c;
    }
 
    public PageReference save() {
        controller.save();//invoke standard Save method
        PageReference pageRef = new PageReference('https://cs2.visual.force.com/apex/CaseMgmt');
        pageRef.setRedirect(true);

        return pageRef;//refresh current page
   }
}