To do a case insensitive search in MSCRM 2011 we need to tweak the query a little bit ,for e.g.
if (!String.IsNullOrEmpty(fieldname)) query.Criteria.AddCondition("fieldname".ToLower(), ConditionOperator.Equal, fieldname.ToLower());
EntityCollection col = service.RetrieveMultiple(query);
Here I am setting the schema name to ToLower() which actually does the trick, hope this help.Leave your comments.
4 comments:
"fieldname".ToLower() simple returns "fieldname". So all that does is tell CRM that the CRM field you want to compare is "fieldname"... It does not tell it to take whatever value that field has and make it ToLower(). So this does not accomplish the task at all. Please take this down/stop posting it.
It used to work with previous version , I haven't verified it in crm 2015.
No, Saurabh Sinha, this never worked in a previous version.
Post a Comment