Search code examples
reporting-servicesdynamics-crmdynamics-crm-onlinedynamics-crm-2015

MS CRM Online : Get records where there no associated record


Need help want to get account records where contacts are not associated with account in a fetch xml report as my CRM is Online. Tried in advanced find but not able to get it.

Thanks, Priya


Solution

  • this is a FetchXML that tells you that accounts are not associated with a contact

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
      <entity name="account">
        <attribute name="name" />
        <attribute name="primarycontactid" />
        <attribute name="telephone1" />
        <attribute name="accountid" />
        <order attribute="name" descending="false" />
        <filter type="and">
          <condition attribute="primarycontactid" operator="null" />
        </filter>
      </entity>
    </fetch>