我正在将SQL转换为FetchXml,以便将Dynamics CRM 2013中的现有报表迁移到Dynamics CRM 2015。有一个选项集并遇到了这个问题
不支持属性类型“Virtual”。从查询中删除属性“s_expensetypename”,然后重试。
问题是:如何使用Fetch Xml CRM 2015 Online获取链接实体中的选项集标签和值。
这是我的Fetch XML:
<fetch mapping="logical" version="1.0">
<entity name="new_timereport">
<attribute name="new_timereportid" alias="InvoiceID" />
<attribute name="new_name" alias="Invoice Number" />
<attribute name="new_projectid" alias="ProjectID" />
<attribute name="new_projectidname" alias="Project Name" />
<attribute name="new_customeridname" alias="Customer Name" />
<filter>
<condition attribute="new_timereportid" operator="eq" value="@SubreportParam" />
</filter>
<link-entity name="new_expenses" from="new_expenseid" to="new_timereportid" alias="Y" link-type="outer">
<attribute name="s_expensetype" alias="Expense Type Key" />
<attribute name="s_expensetypename" alias="Expense Type" />
<attribute name="ownerid" alias="ConsultantID" />
<attribute name="owneridname" alias="Consultant" />
<attribute name="new_date" />
<attribute name="new_amount" alias="Amount" />
<attribute name="new_vat" alias="VAT" />
<attribute name="new_total" alias="Total Amount" />
<attribute name="new_name" alias="Description" />
</link-entity>
</entity>
</fetch>
有关如何处理此事的任何想法?
非常感谢,
答案 0 :(得分:2)
只需从FetchXml查询中删除s_expensetypename字段,然后保留s_expensetype。在数据源中,您将获得2个字段而不是1 - s_expensetype将包含您的optionset的标签,sexpensetypeValue将包含optionsetcode。