Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Advanced find - all accounts, whose contacts have no phonecall with the value of a field set

(0) ShareShare
ReportReport
Posted on by 97

Hi,

I have a specific question for the advanced find. Is it possible and how, to build the following query:

  • get a list of all accounts
    • whose contacts have nophone call
      • where the value of the filed "detail" (custom) is eithe "A" or "B"

I built the query starting on contact getting a list of contacts with this information. That worked. But now I need this list for organisations - and all the phone call records are assigned to contacts.

Does that work with the advanced find (or fetch xml) and how?

Best regards

Markus

*This post is locked for comments

  • Verified answer
    Drew Poggemann Profile Picture
    Drew Poggemann 4 on at
    RE: Advanced find - all accounts, whose contacts have no phonecall with the value of a field set

    Hi Markus,

    News!  The July 2017 update for Dynamics 365 will have the ability to look for NOT IN queries.  

    https://docs.microsoft.com/en-us/dynamics365/get-started/whats-new/customer-engagement/new-in-july-2017-update

    Excerpt from the article:  

    Advanced find

    Advanced find now has the option to build a NOT IN query. For example, users can query for all cases that do not have a related task.

    To do this, users launch advanced find from the icon on the navigation bar. In the query, they choose what type of record to look for, and then select a related record type to see the Does not contain data operator.

    This is a great functionality edition!  Just wanted to let you know what is coming as it might help if you wait for it.

    Thanks,

  • Suggested answer
    Ryan Maclean Profile Picture
    Ryan Maclean 3,070 on at
    RE: Advanced find - all accounts, whose contacts have no phonecall with the value of a field set

    Hi Mark_Us,

    If I understand your request right, then that should be possible with an advanced find similar to the below:

    Advanced-Find-Example.PNG

    This would show you a list of Accounts where the contacts have related phone call records, but where the phone calls do not equal Category (Detail) A or B.

    The limitation with this is that it won't show you accounts where the contacts have not registered any phone calls.  I'm not sure if this is an issue for you?

    Ryan

  • Suggested answer
    Drew Poggemann Profile Picture
    Drew Poggemann 4 on at
    RE: Advanced find - all accounts, whose contacts have no phonecall with the value of a field set

    Hi Marcus,

    Thinking through your question more, the above is not using any code to do so... If you wanted to create a custom view through code the following article should help.  I have not done this approach though.

    msdn.microsoft.com/.../gg594431(v=crm.8).aspx

    Thanks,

  • Suggested answer
    Drew Poggemann Profile Picture
    Drew Poggemann 4 on at
    RE: Advanced find - all accounts, whose contacts have no phonecall with the value of a field set

    Hi Markus,

    Sorry there is no way to do this with advanced find that I know of.  I actually had the same business problem recently and you are not able to do answer this type of question with advanced find unless you had a field on the account that would be a rollup for the number of phone calls for the account and then restrict the view where this count is 0.  Note, rollup fields are calculated in the background on a scheduled basis so there would be some challenges with up-to-date accuracy.

    Example field definition on the Account:

    8510.phonecalls.JPG

    Hope this helps.


    Thanks much,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,407 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans