Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

FetchXML query with link entities giving error: Generic SQL error.

$
0
0

Hi,

We have a fetchxml query which works one of our CRM instance while fails on another instance with error: Generic SQL error.

<fetch version="1.0" output-format="xml - platform" mapping="logical" distinct="False" top="1">
 <entity name="salesorderdetail">
  <attribute name ="salesorderdetailid"/>
  <link-entity name="gc_productkey" from="gc_orderlineitem" to="salesorderdetailid" alias="gc_productkey" link-type="inner">
  </link-entity>
  <link-entity name="salesorderdetail" from="salesorderdetailid" to="parentbundleid" alias="pdd" link-type="inner">
  </link-entity>
 </entity>
</fetch>

  • gc_orderlineitem is a text field on 'gc_productkey' entity which holds the GUID of salesorderdetail.

One more observation on the CRM instance where the query fails was that when we remove either of the link statements, query successfully gives results.

Note: Both are Dynamics 365 instances with same CRM version.


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images