[英]Logfile of SQL Server Database from Microsoft Dynamics 365 online
[英]Extracting entity name from FetchXml columns in Dynamics 365 Database
我正在尝试编写一个SQL查询,以显示Dynamics 365 b8.2(本地)中特定用户拥有的所有高级查找视图。
就获取视图名称和UserQuery视图中的User而言,这很简单,但是与该视图相关的实体仅存储为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>
FetchXml是有效的XML,因此可以使用xpath
/fetch/entity/@name
应该可以工作。 用户拥有的视图应该可以,但是请注意,系统中隐藏了一些非标准的系统视图
您还可以包括returnedtypecode
从属性/场userquery
实体/表。 这将返回视图查询的实体的objecttypecode
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.