Here is how to delete almost any Read Only / Closed item in CRM 4.0.Create a workflow to change the status of the item for closed to new or draft.
For Example…You just installed CRM 4 and are using some test accounts and creating some test invoices…You try to delete the test invoices after they are closed.. and what do you know? You can’t delete them! They are ‘Read only’!
So, you must create a workflow to change the status of the Invoice from Closed to New. To do this:
Go to Settings Then Workflows
New -> Type workflow name ‘Invoice Closed to New’
Entity -> Invoice
Click Ok.
Check ‘Availability to run on demand’
Uncheck everything else.
Add Step -> Change Status
It should read -> Change record status to: Invoice New
Save the Workflow.
Publish the Workflow.
Now go back to the invoice you want to delete. Open it. Run your newly created workflow on it. (Use the workflow button at the top)Close out of the Invoice, and wait for a min or two depending on the load of your system. Then, refresh your page. If the invoice status has changed, you can try to delete it!
Notes: –
1. This trick does not work on Contract record.
2. BE ADVISED -> I don’t know how this will affect any records associated to the items you are trying to delete. USE AT YOUR OWN RISK!!
Hi MayankP,
Thank you for your blog posting. Yes, we are trying to delete a CRM contract record that a status set to “Canceled”. I see you suggestion specifically excludes CRM Contract records. Any suggestions on out to get rid of CRM Contract records that were created erroneously (and set to status = “Canceled”?)
Thank you for your assistance.
Hi Tim,
you need to just update the statecode and status code of relevant contract and contract lines and then once you make them draft you will able to delete it..(in SQL Database)
Please check following thread for the same
http://www.focaya.com/blog/?p=135