Outer join in FetchXML RRS feed

  • Question

  • I am attempting to create an outer join using FetchXML on CRM. I have done some research, and according to a couple of forums, I can not use outer joins in fetch. I am curious to see if this is true. I have included the query that I created. any help with this would be appreciated.

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
      <entity name="contact">
        <attribute name="lastname" />
        <attribute name="firstname" />
        <attribute name="ownerid" />
        <attribute name="contactid" />
        <attribute name="new_contactstatus" />
        <attribute name="fullname" />
        <attribute name="datatel_academicprogramofinterestid" />
        <attribute name="datatel_anticipatedentrytermid" />
        <attribute name="datatel_erpid" />
        <order attribute="lastname" descending="true" />
        <filter type="and">
          <condition attribute="ownerid" operator="eq" uiname="Steven Haas" uitype="systemuser" value="{D83533CB-722E-E211-AEC5-005056A10035}" />
          <condition attribute="statecode" operator="eq" value="0" />
          <condition attribute="new_contactstatus" operator="in">
        <link-entity name="activitypointer" from="regardingobjectid" to="contactid" link-type="outer"  alias="aa">
          <attribute name="modifiedon" />
     <filter type="and">

           <condition attribute="modifiedon" operator="on-or-before" value="@Date"  />
            <condition attribute="statecode" operator="eq" value="1" />
            <condition attribute="activitytypecode" operator="eq" value="4210" />

    Tuesday, June 11, 2013 3:03 PM


All replies

  • The outer joins could not be done through Fetch XML.

    My Weblog | My Website

    Tuesday, June 11, 2013 5:23 PM
  • I want to make sure I get this right, fetchxml does not let me do the outer join, but SSRS does right?

    Tuesday, June 11, 2013 5:31 PM
  • Yes. You could use SSRS for outer joins.

    My Weblog | My Website

    Tuesday, June 11, 2013 5:32 PM
  • Ok, thanks. 
    Tuesday, June 11, 2013 5:34 PM
  • Do you know why it won't allow it, I am just curious.  It would seem it would be a valuable tool when createing reports through fetch, since it so much more dynamic and easier to manipulate then SSRS.

    Tuesday, June 11, 2013 5:36 PM
  • outer joins will be supported in  crm 2013 
    • Edited by kc_narra Wednesday, November 13, 2013 3:12 PM
    Wednesday, November 13, 2013 3:12 PM
  • Just to clarify,   outer joins are supported in CRM 2013, but only for FetchXML reports.  NOT through the Advanced Find UI and views. 

    The postings on this site are solely my own and do not represent or constitute Hitachi Solutions' positions, views, strategies or opinions.

    Thursday, November 14, 2013 2:47 AM