Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Unable to delete unused entities

(0) ShareShare
ReportReport
Posted on by

Objectives: We are trying to delete some unused entities

Server Info: We are currently running Windows Server 2019, with SQL Server 2017 CU20, Dynamics CRM 9.0.15.9

Problem: When we are trying to delete, we are being asked to clear dependencies. However, some dependencies we were not able to fix as system is not allowing us

We are getting 2 kind of issues

1st Issue: When we are trying to delete, we are getting SQL exception as mentioned below, Also, find the Log file attached
pastedimage1593080831945v1.png[View:/cfs-file/__key/communityserver-discussions-components-files/117/MS_2D00_SQL_2D00_Issue_2D00_While_2D00_Delete.txt]

Action taken so far: We tried to enable verbose tracing in ms crm server, but it is showing same error.

2nd Issue: When We are trying to delete one 1:M relationship and during delete we were provided multiple dependencies which we were was able to clean perfectly. However, for one dependency, on clicking on it, nothing is happening

pastedimage1593080998840v2.png

Action Taken so far and understanding: in the db (p_RetrieveDependenciesForDelete), we found that it is referring one dependency. We have seen in the formXML using customization XML, but not able to find any problem or find anything. But, due to this restriction we are not . we tried to delete the dependencies from db end, however, it seems too risky, so seeking help.

  • Kamalesh82 Profile Picture
    50 on at
    RE: Unable to delete unused entities

    Just an update. using metadataservice as well, same exception was thrown.

  • Suggested answer
    Bipin D365 Profile Picture
    28,981 Moderator on at
    RE: Unable to delete unused entities

    Hi,

    As Generic SQL Error does not help us to identity the issue. That is why I asked to check it from C# to see if detailed error is being display to investigate this issue.

    Please Mark My Answer Verified If I Were Helpful

  • Kamalesh82 Profile Picture
    50 on at
    RE: Unable to delete unused entities

    Thanks for reply. Though We have not tried this, but as this issue is coming from server level, I am not sure using Metadata Service will able to help us. Did you have faced such issue before, please suggest if we suggest.

  • Suggested answer
    Bipin D365 Profile Picture
    28,981 Moderator on at
    RE: Unable to delete unused entities

    Hi,

    First Issue -

    Can you try deleting entity from C# code and see what is happening.

    Second issue -

    Check if relationship is removed from Form navigation on form editor.

    If found helpful, Please mark my answer verified.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 95

#3
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 82 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans