我想创建Xrm QueryExpression,并在where子句中连接两列,需要像SQL一样搜索,如下所示:
select * from contact where forename+' '+surname like '%yo%'
我的QueryExpression如下:
QueryExpression pagequery = new QueryExpression();
pagequery.EntityName = "contact";
pagequery.Criteria.AddCondition(new ConditionExpression("firstname" + "lastname", ConditionOperator.Equal, "yo"));
pagequery.ColumnSet.AddColumns("firstname", "fullname", "emailaddress1", "lastname");
EntityCollection results = proxy.RetrieveMultiple(pagequery);
谢谢,
答案 0 :(得分:1)
不幸的是,你提到的方式是不可能的。我可以建议的是: