I am not sure what is wrong in my code, but I get the following compile error:
Error: Non-void method might not return a value or might have statement after a return statement. at line 11 column 9
Below is my VF Page
<apex:page standardcontroller="Revenue_Reports__c" extensions="VF_Controller_CasePgLayout" />
Below is my controller class
public with sharing class VF_Controller_FASPgLayout {
public Revenue_Reports__c R1;
public void VF_Controller_FASPgLayout(ApexPages.StandardController controller) {
this.R1 = (Revenue_Reports__c)controller.getRecord();
}
public PageReference FASpageRedirect() {
if(ApexPages.currentPage().getParameters().get('RecordType') == '01I230000008cX9'){
PageReference pageRef = new PageReference('/apex/RevenueReports_FAS_VfPge');
return pageRef;
}
else if(ApexPages.currentPage().getParameters().get('AccountId') == null){
PageReference pageRef2 = new PageReference('https://cs28.salesforce.com/a4T/o');
return pageRef2;
}
}
}
}
Can someone tell me what is that i am missing or why is this error message appearing?