Recently we had a business requirement to delete a Custom Entity from Dynamics 365/CRM as it was no longer needed. As we all know, to delete an Entity, first we need to remove all the dependencies of the referred Entity from the system views, sub-grids, and plugins, etc. registered on that Entity.
We followed the steps and removed all the dependencies registered on the entity. But we were getting the ‘Cannot Delete Component’ error as shown in the screenshot below;
As seen in the above screenshot, the SDK Message Processing Step is registered for the entity.
However, there were no Plugins registered for the Custom entity.
It took us time to figure it out the actual reason behind it. The reason was that it had activated the Business Rule with the scope ‘Entity’ as seen in the screenshot below;
Note: If the Scope of the Business Rule is other than Entity i.e. either All Form or any particular Form then we don’t need to deactivate the Business rule, it simply deletes the entity.
Hope this helps if you face the same issue.