I am using QueryExpression to generate the filter for the Dynamics crm filters and then passing that to the my CRM made service to retrieve the result.
QueryExpression queryCRM = new QueryExpression
{
EntityName = SourceID,
ColumnSet = new ColumnSet(FieldSet),
Criteria = new FilterExpression()
};
and then
queryCRM.Criteria.AddCondition(strFilterColumnName,ConditionOperator.On , strFilterValue);
Here i am not able to fetch the result can anybody help me to figure out the issue? It doesn't work for "estimatedclosedate" other than this it works fine withe all other columns.
Note := Initially it seems like an operator issue so i used "ConditionOperator.On" , so it solved my issue for Incident but not for opportunity.
Need solution from the CRM experts out there.
Thank You.
Is strFilterValue a string? Try and pass this parameter as a DateTime. It would help if you could post this section of code in it's entirety. Here's some sample code which demonstrates the use of filtering an opportunity by estimated close date.