Forums

Forums / General Discussions / Data Duplication through FetchXML

Data Duplication through FetchXML

3 posts, 1 answered
  1. Missing user
    Missing user avatar
    25 Nov 2021
    Link to this post
    We are getting data through fetch xml. On XRM Tool box the data being returned is not duplicated but when we set that data on template in TPC ListView the data is being duplicated. 
    We set distinct="true" but even then it is being duplicated.
    Fetch XML:
    > We fetch data against 'requesttype' condition. For different values we get different pricings for different services. The data is sometimes correctly fetched against some request type but some times it starts duplicating.

    <fetch version="1.0" distinct="true" mapping="logical" output-format="xml-platform">
      <entity name="ntw_salespricetradeagreement">
        <attribute name="ntw_price" />
        <attribute name="ntw_currency" />
        <order attribute="ntw_name" descending="false" />
        <link-entity name="product" alias="av" to="ntw_productnumber" from="productid" link-type="inner">
          <attribute name="name" />
          <link-entity name="ntw_processrule" alias="aw" to="productid" from="ntw_serviceitem" link-type="inner">
            <filter type="and">
              <condition attribute="new_requesttype" operator="eq" value="18" />
              <condition attribute="ntw_customertype" operator="eq" value="1" />
              <condition attribute="ntw_customerpricingcategory" operator="eq" value="961110000" />
            </filter>
          </link-entity>
        </link-entity>
      </entity>
    </fetch>
  2. Missing user
    Missing user avatar
    Answered
    25 Nov 2021 in reply to Missing user
    Link to this post
    Hello Syed,

    Could you please try editing the ListView widget, going to Advanced > Model and setting the AddMissingLinkedEntityIds value to False.

    Let me know if this solves your issues.

    All the best,

    Brady
    TPC Application Consultant
  3. Missing user
    Missing user avatar
    26 Nov 2021 in reply to Missing user
    Link to this post
    Thanks Bradly, issue is resolved
3 posts, 1 answered