【发布时间】:2018-08-23 03:15:49
【问题描述】:
我正在尝试编写一个 SQL 查询,以显示 Dynamics 365 b8.2(本地)中特定用户拥有的所有高级查找视图。
这在从 UserQuery 视图中获取视图名称和用户方面非常简单,但与该视图相关的实体仅作为 FetchXML 的一部分存储,因此我需要提取它。
我可以在 Fetch XML 上使用 XPath 吗?任何帮助都是极好的! FetchXML的两个例子如下(实体为Account):
<fetch mapping="logical" version="1.0" distinct="false" output-format="xml-platform">
<entity name="account">
<attribute name="name" />
<attribute name="primarycontactid" />
<attribute name="telephone1" />
<attribute name="address2_city" />
<attribute name="parentaccountid" />
<attribute name="new_navnumber" />
<attribute name="emailaddress1" />
<attribute name="new_accountmanager" />
<attribute name="accountclassificationcode" />
<attribute name="accountid" />
<order descending="false" attribute="name" />
<filter type="and">
<condition value="0" attribute="statecode" operator="eq" />
<condition value="1" attribute="new_isshareholder" operator="eq" />
<condition attribute="accountclassificationcode" operator="in">
<value>200001</value>
<value>200003</value>
<value>200005</value>
<value>200007</value>
<value>200009</value>
<value>200011</value>
<value>100000000</value>
<value>200012</value>
</condition>
</filter>
</entity>
</fetch>
【问题讨论】:
标签: sql-server tsql fetchxml dynamics-365