New tool! Bulk Delete Launcher

Today, a new tool that allows you to run bulk deletion of records. Indeed, this feature of CRM is not accessible through the user interface but only with SDK.

To use this tool, you must first create a view in the advanced search that will find the items you want to delete.

Then just run the tool, to indicate on which entity (using the logical name of the entity) is the view advanced search and set scheduling options and recurrence (if desired).

You can also request to receive an email from the CRM server when processing is complete. This option is available if the user account you use has an email address saved in the user profile CRM.


Screenshot:




Download:

Comments

Scott Sewell said…
Thanks for providing this tool - I had no problem connecting and using it in a DEV environment, but when I moved to an environment that requires an SSL connection, I am unable to connect. -
Is there a way to specifiy that the tool should use HTTPS:// to connect to CRM?

Scott.
Tanguy said…
Unfortunately, I didn't manage https connections...

I will update the code as soon as I can
Unknown said…
Very nice! Worked flawlessly. Much appreciated.
Scott Sewell said…
The SSL connectivity works great! - thanks.

I'm getting errors when I attempt to set up a job as a single, non-recurring job. -

Additionally, when I receive the email at the completion of a job, the URL points to MOSS as the server - (and not my servername) - is that set in your code or is it retrieving the server name from somewhere else?
Anonymous said…
This comment has been removed by the author.
Anonymous said…
I'm getting errors when I attempt to set up a job as a single, non-recurring job - populate the fields then uncheck the box, works fine then
Tanguy said…
Hi all,

I was on holidays past 10 days...

I will check these problems as soon as spossible
Tanguy said…
Ok, the problem should have been solved...

You can download again the file...
Tanguy said…
Scott,
about your problem with mail content, I can't do anything, the CRM Server generate the mail content.

It is not performed through SDK
Scott Sewell said…
Thanks Tanguy - I'll test it out.

Did you have the same issue in your testing with the server name? - I wonder if it was something environment specific for me?
Tanguy said…
Scott,

I didn't reproduce the email content problem you had...

The url is well linked to my crm server...
Scott Sewell said…
Thank you for testing it -

I'll re-test in my environment - and see if I can find where that value is being drawn from.

Perhaps it's a registry setting gone wrong. :(
Zosimo Recio said…
Hello to all, I have a problem deleting my 30,000... I use this tool to delete all. But the transaction wasn't delete my data. Is there any mistake on my part? I do all the details given.
Tanguy said…
Hi,
Have a look at the bulk delete view (Settings\Data Management\Bulk Delete Jobs) to see if there were errors when deleting records.

This tool doesn't delete anything, it just creates a new deletion job for the asynchronous service
Anonymous said…
Is there an issue with the tool picking out entities with a space in their name?

For example, I would like to delete queue items so have tried "queue item" with and without quotes but with no joy.
Tanguy said…
You have to use entity logical name which never contains space...

So you should use queueitem instead
Unknown said…
This is a fantastic time saving tool. Much less work than deleting them 250 at a time.
Jevgeny said…
Hello Tanguy!
I just downloaded your tool. I have problem with it. I have CRM deployment on 80 port. I entered server name and 80 port and program retrived organizations. I have Selected one and pressed connect. Program shown message "Connected". But, when I press OK it hangs up and show me error that it can't connect to my server 5555 port :( Where is the problem? Why it tries to connect 5555 port? May be it is problem with my configuration, or it's program's bug?
Tanguy said…
There is no reference to port 5555 in the program.

Did you change the port of your crm web site recently?

If so, the CRM SDK configuration in database can still point to the port 5555
Jevgeny said…
Thanks for quick answer!Yes, its possible. Where I have to change this, to make it pointing to 80 port?
Tanguy said…
Look at the MSCRM_Config database.

It should be in DeploymentProperties or something like that...

Look for any 5555 value and replace with 80
Jevgeny said…
Thanks Tanguy. Everything working well.
Anonymous said…
This is a great tool. Thanks for all effort you have put together for this tool. I am having problem in creating a job. I have managed to connect to the crm server. I select the organisation name and clicked ok. It bring me to the main window. I type contact and press "Retrive View" Button. I get an error message "An Item with the same key already been added." I know the strength of this and will help me a lot. Could you please tell, what went wrong, in my case.
Thanks
Tanguy said…
You simply (as simpply it could be) must have two views with the same name.
The Crm server doesn't check if a view name already exists...
Ken said…
Great tool! As a consultant working on several implementations a month This will save me a ton of time. Thank you! Donation on the way!!
Anonymous said…
I don´t suppose this works on CRM 3.0?
CRM Services said…
CRM is a way of using technology to do just that. The idea of CRM is that it helps businesses use technology and human resources to gain insight into the behavior of customers and the value of those customers. Thanks for your posts.CRM Services
Ajmal Ziyad said…
Thanks for this cool tool , do you have any bench mark no the performance . say I have 1 million records, how much time it will take to complete the job.
Tanguy said…
Hi,

I never did benchmark... and currently don't have time to do one...

sorry
Scott Sewell said…
Ajmal -

The bulk delete processor runs at approximately the same speed as selecting all records on a page and deleting them. (250 at a time.)

Tanguy's utility is very helpful, but it's not a speed shortcut since it engages the CRM API for bulk deletion.

Your performance will vary depending on your server/SQL optimization and the type of entity you are deleting.

(The type of entity matters because if the record is one that potentially has child records, each record's children must be checked before deleting to ensure no records are orphaned.)

HTH
Scott
Gordie said…
This comment has been removed by the author.
Anonymous said…
Hi,

First off Great Tool, and thank you. I ran a job that deleted 80,000+ fields and they were all removed from the crm tool. However when i check the sql tables that hold the background data the rows still exist but now only have nulls as their data. Does this tool not actually remove the data and just clear the forms in the CRM Module?


Thanks
Gordie
Tanguy said…
Hi gordie,

the tool just Mark records as deleted (deletionstatecode = 2).

It works like the manual deletion, the record is not hard deleted. This is the deletion service that hard delete the sql rows. By default, it occurs once per day
Anonymous said…
What is the deletion service that permanently deletes the rows from SQL?

Gordie
Tanguy said…
The deletion service is a maintenance job that is executed by the Microsoft CRM asynchronous processing service.

You can see when it is planned by using the tool ScaleGroupJobEditor (http://code.msdn.microsoft.com/ScaleGroupJobEditor/Release/ProjectReleases.aspx?ReleaseId=3251)
Anonymous said…
I really need to use this tool but I am having issues connecting with it.

I have set my physical server name and the port. I used the same info I can use to connect to CRM from the physical server. When I do and hit the Get Orgs. button it does pull one one of 2 orgs, the test enviornment which was created before prod but which has a similar name crm-test vs. crm.

When I hit connect, I get an error message that says "Error while initializing the connection: The request failed with HTTP status 401: Unauthorized?

Any help?
Tanguy said…
The main reason of the HTTP 401 error with my tools is a bad server configuration.

When you connect idrectly to your server, you know what URL you will use to access it.

My tools query the CrmDiscoveryService to retrieve the URL to use. If your server is not configured properly, you can get this error. To be sure, connect to MSCRM_CONFIG database, look into DeploymentProperties table. You should have two lines (the second and the third ones) that have the server name and port, be sure it is the name you use habitually.
Anonymous said…
Thanky you very much, I am using your tool to delete around 20,000 records right now. Now per your last response to my prior question. I can access CRM via the server itself using http://servername:5555, your tool can also pick it up at http://servername:5555. I do not have IIS set to to recognize http://servername:5555... Is this a mistake?
Tanguy said…
Hi,
If IIS is not set for you rCRM website to use port 5555, it looks like a website update. In this case you should have changed also the entries in the deploymentproperties table in the database MSCRM_CONFIG.
Did you look to see wath was the actual values in this table?
Anonymous said…
Oh I got it working, it saved my day! I installed CRM letting it create a new web site. THen I set up the bindings in IIS so that they are using port 80. So your saying I should also update this table value to port 80?

Let me clarify my last message:
Your tool can recognize CRM at http://servername:5555

My users are using 3 separate sites depending on the tennant at www.crm.com, www.xrm.com www.customers.com which I had internall DNS names registered. These are all using port 80.

Your saying I should update this port in the MSCRM_CONFIG database. It shows 5555. How did I do this and I suppose I am not seeing any errors because of it?

BTW I sent you a donation yesterday for your help!
Tanguy said…
Ok, these values are used only when you query the CrmDiscoveryService, so if you don't need it, you won't get any error message, even if you deployment is badly configured. My tools do use the discovery service. That's why it failed.

In your case, you changed the bindings of CRM website port but doing that didn't change the DeploymentProperties table. You have to update it manually. To do so, just use SQL Management Studio, open this table in edit mode and put 80 instead of 5555, restart IIS. That should do it...

And many thanks for the donation, I appreciate it :)
Tanguy said…
This comment has been removed by the author.
Anonymous said…
Another question. I used this this past Saturday for about 9 jobs deleting about 20,000 records. I found I needed to delete a few more today and I used my saved configuraiton in your tool. I create a new deleting job with the tool and started it but no jobs are being created in CRM and I am not getting any error messages? I created a new connection to the same CRM instance and tried again, no luck?
Tanguy said…
Just be sure that the asynchronous process service is started. If it is, it Will require more investigations
Anonymous said…
They did start at some point, but they didn't show in the delete queue. Is there any way to see pending items in a log, or remove them if necessary?
Tanguy said…
If I remember well, a scheduled job doesn't appear until it is running...
Are you in this case?
Anonymous said…
Thanks for the tool. I have an issue related to users. I have a view that pulls opportunities created by a specific user (Created By Equals ...). When the bulk delete job gets created the advanced find query in the bulk delete job does not have the user filled in. It just says "Enter Value" and since the bulk delete jobs are read only there is no way to enter the user. Is there a reason why that part of the view does not get carried over to the bulk delete job? Any ideas?
Thanks
Anonymous said…
Hi there,

I've set up a bulk delete job, but it doesn't display in CRM, even after it says Bulk Job created in the Delete tool. Any suggestions?
Tanguy said…
Hi "anonymous"!

The job will not appear if:
- the asynchronous service is stopped
- the job was planned at a future datetime
- you have exrta problems on your server :)

Also, try to look the system jobs. An entry should be there for the job...
Unknown said…
Hii,

Good Tool.
May I know how to Stop this tool when I have Launch With Recurrence.
I Want to Stop it.

please advise.

thanks ^.^

Nico
Tanguy said…
As it has been explained may times, this tool just ask the CRM server to create a new job.

This job is stored in systemtasks. So you should be able to find it and delete it.
Unknown said…
where is I can find systemtask ?.

thanks before.
Tanguy said…
it's an entity, you can query it through advanced find or navigate to Settings\System tasks
Unknown said…
Yeahhh...

Finally, I Found it:
System/ System Jobs and change view into "Recurring System Jobs" and Find the Schedule Name Click on it and then click Cancel

^.^

Thanks alot Brother for your cooperation.
Anonymous said…
Nice work on your CRM Tools man. I found some more tools from http://thembronics.com.
Anonymous said…
What is the logical name for the system jobs entity?
Tanguy said…
It is asyncoperation
Anonymous said…
Hi Tanguy,

I have over 70000 System Events in the Async table. Can these records be deleted safely? What are they in relation to?
Tanguy said…
System Events records are only history records except for recurring jobs like a bulk delete can be...

If you do not have recurring jobs, you can delete them safely...

I do it every week for a customer and there was no problem since 6 months
Anonymous said…
Hi Tanguy,

Is there a way to run a Bulk Delete job daily indefinitely. I see there is an 'interval' that can be set, but I would like to run a schedule bulk delete job daily without having to create one every now and then. Just permanently...

Thanks for the great app
Tanguy said…
Hi,

Yes you can. The interval property just define the period between occurence of the job.

So if, you add recurrency, it will works indefinitively until you cancel the system task.
Anonymous said…
It's a perfect tool. Just one question, when we create a scheduled job, how to modify the scheduled date time or delete this scheduled job?
Tanguy said…
Hi,

You need to search in system tasks the record that corresponds to your bulkdelete job.

Once you find it, you can cancel it.
Anonymous said…
Hello, I just started using this bulk delete tool and have run into a problem. I successfully performed a deletion on the Incident entity, but now that I try it again for a different date range (defined in my view), I get the error "Error while retrieving views: An item with the same key has already been added." It only happens with the Incident entity; I can retrieve views for other entities. How do I fix this?

Thank you very much.
Anonymous said…
This tool is great. Thank you so much for providing it. I recently discovered that my Queue Item table is very large and tried to delete some older entries. They all failed with the error description "Invalid Recipient Type" and then link under Name generates a popup alert saying "2029 is not a recognized Object type." Do I need to delete another entity first? Thanks in advance for any help you can provide.
Tanguy said…
Regarding "Error while retrieving views: An item with the same key has already been added" error, I guess you have two views with the same name...

I think it is the only possibility to have this error message. Can you confirm?
Tanguy said…
Regarding error "Invalid Recipient Type", I have no clue but the program just asks to launch a bulk delete to the CRM platform.

If something goes wrong after, it is only CRM related, my tool is not involved anymore.

And honestly, I never tried to delete queue items and can't tell what's wrong. Maybe you could post a question on the Dynamics CRM forums.
Anonymous said…
Woohoo! Thank you, thank you! You were exactly right. I did somehow have two views named the same. That fixed it. And thanks for the fast response, too.
Anonymous said…
Thanks for your reply. I have posted by question to the CRM forums. Will see if anyone answers!
Joe said…
Regarding error "Invalid Recipient Type", in my case this error occured when I tried to delete records of type activityrecord - this was not possible.

I had to use the concrete entitytype for my query - in my case this was the email type. So I changed my query and the emails were history.
Anonymous said…
Will this tool work with CRM 2011?
Tanguy said…
There is no need, crm 2011 includes a graphical Bulk delete feature
Andrea said…
hello.
this tool seems great, but when I try to launch a bulk deletion I get the following error :

---------------------------
Error
---------------------------
Error while creating bulk delete job: The date-time format for 2012-02-01 04.58.29 is invalid, or value is outside the supported range.
---------------------------
OK
---------------------------
Anonymous said…
I just wanted to say thank you for this tool. It works wonderfully and has saved me a lot of time.
Anonymous said…
I can't seem to get your tool to connect to my database and I've tried every configuration. I have my server name, but when I go to look at the properties of the config and other CRM database, I see nothing listed as a port. Within our domain we have it set up for http://servername:5555.

Help?
Anonymous said…
FINALLY got the tool to connect but it states that there's an error retrieving views and cannot find the entity????
Tanguy said…
Hi,

Are you connecting to CRM 4.0 server?
Patrick Mwangi said…
Dude you rock...
Lewis Ostrander said…
Tanguy. Does this tool work with CRM 2011? I'm trying to connect to the contact entity and getting "Error while retrieving views: An item with the same key has already been added".

I don't get this error when accessing other entities.
Tanguy said…
Hi Lewis,

It does not work with CRM 2011 but CRM 2011 has a built in bulk delete wizard

Go on a list of entity records, and use the arrow next the delete button to open the bulk delete wizard
Vinay Singh said…
You can also export a single file and email it to anyone you'd like in a single step. Once you select an item, click "Share" and select "Email as attachment...".

Email Blast
LuisAlberto said…
Hello,

First, congrats for the very interesting tool, it's really a nice job.

I would like to consult you about a problem we're having in our company in New Zealand. We tested the tool in out test environment and it worked perfectly. However, when we run it in production, following the same steps, for some reason doesn't work. The deletion task in CRM shows state "Waiting" and stays there until we kill the process (last time it was over 1 week). Besides from that, we get no error message or any indication of an error of any type, and no record is deleted.

Is there any possibility you might know what could be happening?

Thanks in advance,

Luis
Tanguy said…
My tool just create a bulk delete record. Everything else is handled by the CRM Asynchronous processing service.

So, I would check this service to be sure everything is ok...
Unknown said…
I really appreciate spending some time to talk about that, I believe firmly regarding this and so really enjoy understanding more about this kind of subject.This is also a very good post which I really enjoyed reading. It is not everyday that I have the possibility to see something like this. CRM Software || MLM Software in Mumbai || ERP Software || System Software in Mumbai
Unknown said…
Keep up the fantastic piece of work, I read few blog posts on this web site and I believe that your site is real interesting and has lots of great information. ERP Software in Mumbai || System Software || CRM Software in Mumbai || MLM Software

Popular posts from this blog

New XrmToolBox plugin : Import/Export NN relationships

Searchable Propery Attribute Updater

Full featured CRM grid in HTML/JS