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
anil rathoureanil rathoure 

Visualforce Error : Return type of an Apex action method must be a PageReference. Found: java.lang.Boolean

When I clicking on a button I am getting this error.

Visualforce Error : Return type of an Apex action method must be a PageReference. Found: java.lang.Boolean 

Any clues why this error comes ?




 
Suresh31sSuresh31s
Method should return a pagereference to a page that reflects your changes. Or else it doesnt know what to display. 
Or else you can add a proxy method:
public pageReference yourMethodName()
 yourActualmethodName();
return null; 
}
anil rathoureanil rathoure
thanks issue has been resolved but when i click on save it is not redirecting to the record page although I have used correct page refrence thing .