[英]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.