Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
Posts: 5
Registered: ‎08-19-2011
My Device: Blackberry Bold 9000
My Carrier: Claro

Task FilterExpression

Hello everyone.


I am new to Webworks and Blackberry development in general.
I am trying to get a list of all the tasks that are due today:

I created a sample task (in order to find it) using this:


var newTask = new blackberry.pim.Task();   

newTask.summary = "Complete this task today!";   

newTask.note = "This is a sample note";   

newTask.priority = blackberry.pim.Task.PRIORITY_NORMAL;   

newTask.due = new Date("2011-09-30");   

newTask.save();

 

This is how I'm trying to locate the task:


var dueTodayFilterExpression = new blackberry.find.FilterExpression("due", "==", "2011-09-30");   

result = blackberry.pim.Task.find(dueTodayFilterExpression, "priority", -1, true);

 

But for some reason, result.length==0.

 

Am I missing someting?

I did find find a question similar to mine on this forum, but it said it was a bug that was corrected in Blackberry Webworks 2.0.  I'm using version 2.1.

 

Thanks in advanced.