不支持属性类型 "Virtual"。从查询中删除属性 "XYZ",然后重试

Attribute type "Virtual" is not supported. Remove attribute "XYZ" from the query, and try again

我正在将 SQL 转换为 FetchXml,以便将 Dynamics CRM 2013 中的现有报表在线迁移到 Dynamics CRM 2015。这个问题有一个选项集和 运行

不支持属性类型 "Virtual"。从查询中删除属性 "s_expensetypename",然后重试。

问题是:如何使用 Fetch Xml CRM 2015 Online 在 link 实体中获取选项集标签和值。

这是我的 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>

关于如何处理这个问题有什么想法吗?

非常感谢,

只需从 FetchXml 查询中删除 s_expensetypename 字段并保留 s_expensetype。结果,在数据源中,您将获得 2 个字段,而不是 1 个字段 - s_expensetype 将包含选项集的标签,而 sexpensetypeValue 将包含选项集代码。