web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Suggested answer
    Drew Poggemann Profile Picture
    4 on at

    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,

  • Suggested answer
    Drew Poggemann Profile Picture
    4 on at

    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
    Ryan Maclean Profile Picture
    3,070 on at

    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

  • Verified answer
    Drew Poggemann Profile Picture
    4 on at

    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,

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans