[英]Select an Entity using QueryExpression? C# Dynamics CRM Online 2015
In dynamics CRM online 2015 we have installed custom extensions for our company however we can't pull data for it, our code: 在Dynamics CRM Online 2015中,我们为公司安装了自定义扩展,但是我们无法为其提取数据,我们的代码为:
QueryExpression qe = new QueryExpression();
qe.EntityName = "tsg_project";
qe.ColumnSet = new ColumnSet();
qe.ColumnSet.Columns.Add("name");
EntityCollection retrieved = serviceA.RetrieveMultiple(qe);
This returns null, when in dynamics it's: 在动力学中,它返回null:
However for 'account' this works fine. 但是,对于“帐户”来说,这很好。
How could I get this to work? 我该如何工作?
your query will throw an error because a custom entity can't contain an attribute called name
but probably is tsg_name
. 您的查询将引发错误,因为自定义实体不能包含名为
name
的属性,但可能是tsg_name
。
so your code needs to be: 因此您的代码必须是:
QueryExpression qe = new QueryExpression("tsg_project");
qe.ColumnSet = new ColumnSet("tsg_name");
EntityCollection retrieved = serviceA.RetrieveMultiple(qe);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.