2013-04-09 57 views
1

我正在嘗試創建一個視圖,該視圖將顯示訂單中的數據。訂單與訂單付款有一對多的關係。付款將顯示在訂單上。我遇到的問題是,當您運行查詢時,付款信息不會顯示。這是來自視圖的XML。Dynamics CRM 2011 - 查看不顯示相關信息

<?xml version="1.0"?> 
    -<fetch distinct="false" mapping="logical" output-format="xml-platform" version="1.0"> 
    -<entity name="salesorder"><attribute name="name"/> 
     <attribute name="customerid"/> 
     <attribute name="totalamount"/> 
     <attribute name="salesorderid"/> 
     <order descending="false" attribute="name"/> 
    -<filter type="and"><condition attribute="totalamountlessfreight" value="0" 
      operator="gt"/> 
     <condition attribute="ree_orderdate" operator="this-month"/> 
    </filter> 
    -<link-entity name="ree_salesorderpayment" alias="a_eaddfe488ba0e2118a9d78e3b508542d" link-   type="outer" visible="false" to="ree_payment" from="ree_salesorderpaymentid"> 
     <attribute name="ree_paymentdate"/> 
     <attribute name="ree_paymentamount"/> 
    </link-entity> 
    </entity></fetch> 

這可能嗎?

感謝, 加里

回答

0

你創建這個XML?一個很酷的新東西是高級查找你可以下載FecthXml。在高級查找中,您可以更改過濾器並查看查詢失敗的位置。

編輯:在高級查找你可以設置你想要的所有查詢,使過濾器(只加列和應用運算符AND和OR),你可以做,當你想過濾相關實體聯接。之後,您可以下載FetchXML,因此我們確信FetchXML格式良好。如果沒有得到任何記錄,問題出在您的數據而不是FetchXML中,所以我建議您刪除過濾器以知道問題在哪裏。

我不知道你是哪個登錄,但如果你不使用管理員很可能你抓住一些關於安全權限。

你可以試着改變實體,使查詢ree_salesorderpayment實體,使後salesorder聯接。

+0

我下載了XML。我會檢查過濾器。謝謝 – Gary 2013-04-09 15:10:22

+0

我在高級查找窗口的任何地方都看不到過濾器。我錯過了什麼嗎?謝謝 – Gary 2013-04-09 15:27:04

+0

當您添加一列到過濾器時,過濾器出現。看看這篇文章(http://blog.xrm.com/index.php/2011/11/lets-crm-online-2011-advanced-find-part-1/) – 2013-04-09 22:22:40

0

Stunnware Tools應用程序是老了,但還是不錯的FetchXML。我之前注意到的一個問題是,在查詢奇怪的行爲之前,如果貨幣字段行爲異常,那麼將transactioncurrencyid字段添加到列可以提供幫助。