Answered by:
what is the best way to delete 10000 data? (bulk delete)

Question
-
Hi there,
I'm quite new to MS CRM so this might be stupid question...
As I said in the title, does anyone have best practice for deleting more than thousand of data on CRM?
I'd like to avoid deleing them manually(even though you can delete 250 at once)...
I read following post...but it is the right way to clean data?Is there any risks by deleting customize and importing the same thing?
I'm worrying if there's a chunk to be left over...
http://social.microsoft.com/forums/en-US/crmdeployment/thread/c7a97016-6132-4343-850f-567fbc3d7325/
Thanks,
HTMonday, June 15, 2009 7:12 AM
Answers
-
Hi,
As you said, there is only one way to delete the records in the supported way, using the UI - by deleting them max 250 at a time (unless you update the UserSettings table - that is unsupported). The way described in the post with deleting the entity will work and if you backup your customizations of that entity and you re-import it after the deletion, almost everything will work fine. I wrote 'almost', because the entitytypecode will be different after the second creation of that entity and one may have scripts that belong on the entitytypecode. If you are sure you don't have any scripts, you can do so.
However I would recommend reading the text about BulkDelete request available here: http://msdn.microsoft.com/en-us/library/cc155955.aspx. It contains a code sample that you could alter a bit and use to delete whatever you want. And in the supported way!
I hope you'll find the right solution :).
Kind regards,
Kuba
-- Kuba Skałbania, Netwise- Marked as answer by Donna EdwardsMVP Friday, June 19, 2009 9:18 PM
Monday, June 15, 2009 4:10 PM
All replies
-
Hi,
As you said, there is only one way to delete the records in the supported way, using the UI - by deleting them max 250 at a time (unless you update the UserSettings table - that is unsupported). The way described in the post with deleting the entity will work and if you backup your customizations of that entity and you re-import it after the deletion, almost everything will work fine. I wrote 'almost', because the entitytypecode will be different after the second creation of that entity and one may have scripts that belong on the entitytypecode. If you are sure you don't have any scripts, you can do so.
However I would recommend reading the text about BulkDelete request available here: http://msdn.microsoft.com/en-us/library/cc155955.aspx. It contains a code sample that you could alter a bit and use to delete whatever you want. And in the supported way!
I hope you'll find the right solution :).
Kind regards,
Kuba
-- Kuba Skałbania, Netwise- Marked as answer by Donna EdwardsMVP Friday, June 19, 2009 9:18 PM
Monday, June 15, 2009 4:10 PM -
Hi,
you can modify how many records you can see on one page directly in the Database. Of couse, this is unsupported, but i use it, when i have to delete many records.
I change the entry in the Database to 5000, so i can delete 5000 records in one selection.
You have to change the field PagingLimit in the table usersettingsbase of you CRM-Database.
But be aware, it is unsupported!!!
Viele Grüße
Michael Sulz
axcentro GmbH- Proposed as answer by Michael Sulz Tuesday, June 16, 2009 7:06 AM
Tuesday, June 16, 2009 7:06 AM -
Michael,
This is exactly the scenario that I described amongst others :).
Kind regards,
Kuba
-- Kuba Skałbania, NetwiseTuesday, June 16, 2009 1:17 PM