You need to sign in to do that
Don't have an account?
Sean Barczynski
Error: Unknown Property
Hello,
I'm trying to create a VisualForce page listing all clients who are due for a meeting. I have created a Controller class and VF page using Eclipse. When I try to save the VF page to the server, I receive the following error:
Save error: Unknown property 'DueForReview.getAccounts'
Here is my code
Controller
VF Page
Please help!
I'm trying to create a VisualForce page listing all clients who are due for a meeting. I have created a Controller class and VF page using Eclipse. When I try to save the VF page to the server, I receive the following error:
Save error: Unknown property 'DueForReview.getAccounts'
Here is my code
Controller
public class DueForReview { private final List<Account> accounts =[select Id, Name, Review_Frequency__c, Last_Review_Meeting__c from Account]; List<Account> DueForReview; public DueForReview() { for(Integer i=0; i<=accounts.Size()-1; i++) { if(accounts[i].Review_Frequency__c == 'Quarterly' && accounts[i].Last_Review_Meeting__c <= Date.newInstance(System.today().year(),System.today().month()-3,System.today().day())) { DueForReview.add(accounts[i]); } if(accounts[i].Review_Frequency__c == 'Semi-Annually' && accounts[i].Last_Review_Meeting__c <= Date.newInstance(System.today().year(),System.today().month()-6,System.today().day())) { DueForReview.add(accounts[i]); } if(accounts[i].Review_Frequency__c == 'Annually' && accounts[i].Last_Review_Meeting__c <= Date.newInstance(System.today().year()-1,System.today().month(),System.today().day())) { DueForReview.add(accounts[i]); } } } public List<Account> getAccounts() { return DueForReview; } }
VF Page
<apex:page controller="DueForReview"> <apex:pageBlock title="Clients Due For Review"> <apex:pageBlockTable value="{!getAccounts}" var="account"> <apex:column value="{!account.name}"/> <apex:column value="{!account.Review_Frequency__c}"/> <apex:column value="{!account.Last_Review_Meeting__c}"/> </apex:pageBlockTable> </apex:pageBlock> </apex:page>
Please help!
Just need a small change.
-Thanks
Ashlekh Gera
All Answers
Just need a small change.
-Thanks
Ashlekh Gera