How do I pull a list of all companies with no active contacts associated with them?
I can pull a list of companies with no contacts but not no active contacts. I want to deactivate old not used companies.
Hello,
I see 2 ways to achieve your goal:
1. Marketing Lists. Here is what you can do:
1.1. Create a static marketing list with the target entity as "Account".
1.2. Add all accounts to that list.
1.3. Remove accounts from that list based on Advanced Find Query and the Query, in this case, will be "Accounts with Active Contacts" - it should be straight forward.
1.4. As a result, the marketing list you created on step 1.1 will contain only accounts without active contacts.
2. Enhanced tricks with FetchXml - Microsoft introduced the "Doesn't contain" feature to FetchXml and in order to utilize that feature it would be required to use XrmToolBox tools that are described here - www.arbelatech.com/.../creating-system-views-with-complex-not-in-filter-in-dynamics-365-for-customer-engagement.html
Well, I understand the issue with the limitations of Advanced Find. How many Companies/Accounts do you have? You could pull two lists - 1 All Companies and 2. All Companies with an Active Contact, export to excel.
Then put both into the same excel sheet and compare the lists, remove the ones that have an account in each list, then you have a list of accounts to turn off. From there, you could attempt to import that list as inactive (you would need a unique id for the import, plus I am not 100% sure on limitations of importing records as inactive). If that idea doesnt work, due to the import, you could flag them all in a different field, then filter on said field and deactivate.
If the excel idea is out of the question let me know, Im sure I can come up with something else.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156