Advanced Find - Subqueries supported or not? RRS feed

  • Question

  • We are using Microsoft Dynamics CRM 2013.

    I would like to do a Query which involves some Sub-Queries, for example I want to see all Accounts meeting a certain criteria, and then for each one display some Counts, e.g. the total number of contacts meeting a certain criteria within each of the Accounts.

    Is there a way to do this in the Advanced Find?

    I can't seem to find a way, and I suspect I will need to do this with some custom code to talk to the database directly.

    But I just wanted to check before I go down that path.

    Tuesday, November 19, 2013 1:09 AM

All replies

  • You can search data upto one level down easily in advancefind, for example you can select account entity in advancedfind and apply required condition on related contact.


    Our Website | Our Blog | Follow US | My Facebook Page | Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Tuesday, November 19, 2013 1:41 AM
  • David,

    You can do sub-queries using Advanced Find. However, you will not be able to do any count/sum. If you need aggregation or other calculations  or groups in the result set then you can use reports (OOB / SSRS based on the exact requirement)

    If my response helps you in finding your answer then please click 'Mark as Answer' and 'Vote as Helpful'

    • Proposed as answer by Mamatha Swamy Tuesday, November 19, 2013 4:16 AM
    Tuesday, November 19, 2013 4:16 AM