I'm doing this simple query inside a plugin:
QueryExpression query = new QueryExpression(hb_aula.EntityLogicalName);
query.ColumnSet = new ColumnSet(true);
query.Criteria = new FilterExpression(LogicalOperator.And);
query.Criteria.Conditions.Add(new ConditionExpression("hb_datafim", ConditionOperator.NotOn, DateTime.Now));
EntityCollection ent = service.RetrieveMultiple(query);
Where I'm trying to retrieve all hb_aula
records in which hb_datafim
date field is not on today (or some other specific date, DateTime.Now
is just an example).
When I execute this I get the error
Unknown Condition Operator: NotOn.
Am I doing anything wrong or is this an unfinished CRM 2011 feature?