Answered by:
Find Accounts with no cases

Question
-
Can anybody help? currently we record all activites through cases and only use accounts for customer details only.
I want to get rid of any accounts which have had no cases recorded against them.
Is there any way to achive this quickly without the use of java script.
s mcclellanMonday, November 28, 2011 3:50 PM
Answers
-
Typically the easiest solution is to use a static marketing list:
- Create a marketing list for accounts
- Add all accounts that you want to check to the marketing list
- Use an Advanced Find to remove from the marketing list all accounts that have a case recorded against them
- The marketing list will now contain the accounts without a case
Microsoft CRM MVP - http://mscrmuk.blogspot.com http://www.excitation.co.uk- Edited by DavidJennawayMVP, Moderator Monday, November 28, 2011 5:18 PM
- Proposed as answer by Jamie MileyModerator Tuesday, November 29, 2011 3:16 PM
- Marked as answer by mcclellan Tuesday, November 29, 2011 3:55 PM
Monday, November 28, 2011 5:17 PMModerator -
Now, to remove them you will probably still need to do that one by one or else you will need to write a script or .NET program to do it.
Jamie Miley
Check out my about.me profile!
http://mileyja.blogspot.com
Linked-In Profile
Follow Me on Twitter!- Proposed as answer by Jamie MileyModerator Tuesday, November 29, 2011 3:16 PM
- Marked as answer by mcclellan Tuesday, November 29, 2011 3:55 PM
Monday, November 28, 2011 5:41 PMModerator -
+1 to Jamie's answer - you'll most likely want to do this with some code, probably a console application that performs the query, retrieves the guids of the records to delete and then does a foreach loop to delete them.
You might alternatively be able to do this with a bulk delete operation, see http://msdn.microsoft.com/en-us/library/gg334418.aspx. You should also have a look at the following article too: http://blogs.infinite-x.net/2011/07/11/crm-2011-programmatically-creating-a-bulk-delete-job/
Paul Dowman, CRM Developer- Proposed as answer by Jamie MileyModerator Tuesday, November 29, 2011 3:16 PM
- Marked as answer by mcclellan Tuesday, November 29, 2011 3:56 PM
Tuesday, November 29, 2011 10:42 AM -
Thanks David for this work around. But now I have to find a way of deleting these 9000 odd records quickly. Any Ideas? unfortunatly I do not have direct access to the SQL sever where the data sits due to IT internal policy. Any other solution available?
s mcclellan- Marked as answer by mcclellan Tuesday, November 29, 2011 3:56 PM
Tuesday, November 29, 2011 8:11 AM -
All three posts I have marked as proposed are good parts of a single solution and as such, if these work for you, you should mark all of them as answer. :)
Jamie Miley
Check out my about.me profile!
http://mileyja.blogspot.com
Linked-In Profile
Follow Me on Twitter!- Marked as answer by mcclellan Tuesday, November 29, 2011 3:56 PM
Tuesday, November 29, 2011 3:17 PMModerator
All replies
-
Typically the easiest solution is to use a static marketing list:
- Create a marketing list for accounts
- Add all accounts that you want to check to the marketing list
- Use an Advanced Find to remove from the marketing list all accounts that have a case recorded against them
- The marketing list will now contain the accounts without a case
Microsoft CRM MVP - http://mscrmuk.blogspot.com http://www.excitation.co.uk- Edited by DavidJennawayMVP, Moderator Monday, November 28, 2011 5:18 PM
- Proposed as answer by Jamie MileyModerator Tuesday, November 29, 2011 3:16 PM
- Marked as answer by mcclellan Tuesday, November 29, 2011 3:55 PM
Monday, November 28, 2011 5:17 PMModerator -
Now, to remove them you will probably still need to do that one by one or else you will need to write a script or .NET program to do it.
Jamie Miley
Check out my about.me profile!
http://mileyja.blogspot.com
Linked-In Profile
Follow Me on Twitter!- Proposed as answer by Jamie MileyModerator Tuesday, November 29, 2011 3:16 PM
- Marked as answer by mcclellan Tuesday, November 29, 2011 3:55 PM
Monday, November 28, 2011 5:41 PMModerator -
Thanks David for this work around. But now I have to find a way of deleting these 9000 odd records quickly. Any Ideas? unfortunatly I do not have direct access to the SQL sever where the data sits due to IT internal policy. Any other solution available?
s mcclellan- Marked as answer by mcclellan Tuesday, November 29, 2011 3:56 PM
Tuesday, November 29, 2011 8:11 AM -
+1 to Jamie's answer - you'll most likely want to do this with some code, probably a console application that performs the query, retrieves the guids of the records to delete and then does a foreach loop to delete them.
You might alternatively be able to do this with a bulk delete operation, see http://msdn.microsoft.com/en-us/library/gg334418.aspx. You should also have a look at the following article too: http://blogs.infinite-x.net/2011/07/11/crm-2011-programmatically-creating-a-bulk-delete-job/
Paul Dowman, CRM Developer- Proposed as answer by Jamie MileyModerator Tuesday, November 29, 2011 3:16 PM
- Marked as answer by mcclellan Tuesday, November 29, 2011 3:56 PM
Tuesday, November 29, 2011 10:42 AM -
All three posts I have marked as proposed are good parts of a single solution and as such, if these work for you, you should mark all of them as answer. :)
Jamie Miley
Check out my about.me profile!
http://mileyja.blogspot.com
Linked-In Profile
Follow Me on Twitter!- Marked as answer by mcclellan Tuesday, November 29, 2011 3:56 PM
Tuesday, November 29, 2011 3:17 PMModerator