You need to sign in to do that
Don't have an account?

Unknown Property Error
I don't understand why I'm getting the error :
![]() | Error: Unknown property 'MyOpenActivities.MyCasesToDo' |
Here's the page code:
Code:
<apex:page controller="MyOpenActivities"> <apex:form > <apex:pageblock Title="Hello {!$User.FirstName} {!$User.LastName}" id="TitleBlock"> <h1> Version 1.0 </h1><br /> Here are the lists for open Technical Support Activities that require your attention.<br /> Open Cases, Service Activity and Demos.<br /> </apex:pageblock> </apex:form> <apex:form > <apex:pageblock title="My Open Cases"> <apex:pageBlockTable value="{!MyCasesToDo}" var="c"> </apex:pageblocktable> </apex:pageblock> </apex:form> </apex:page>
Here's the controller:
Code:
public class MyOpenActivities { Public String CurrentUserId {get; set;} Public List<Case> MyCasesToDo; Public MyOpenActivities(){ this.CurrentUserId=UserInfo.getUserId(); } public List<Case> getMyCasesToDo(string CurrentUserId){ List<Case> MyCasesToDo = new Case[]{}; MyCasesToDo = [Select OwnerId, Subject, Status, Service__c, Priority, Origin, Id, Description, ContactId, Account.Name, AccountId From Case Where OwnerId = :CurrentUserId]; return MyCasesToDo; } Static testMethod void testThisController() { MyOpenActivities testController = new MyOpenActivities(); string CurrentUserId=UserInfo.getUserId(); testController.getMyCasesToDo(CurrentUserId); } }
I've done this exactly the same way on quite a number of other page/controllers. Any idea why it's happening now?
Do it this way:
All Answers
Do it this way:
Your welcome and thank you for your support of the community.
http://salesforcesource.blogspot.com