Unable to open Document Naming Settings after uninstalling Frappe CRM (DocType not found error)

Hi Team,

I recently installed the Frappe CRM app on my ERPNext instance and later uninstalled it.

However, I am now facing an issue where the system still tries to access CRM-related DocTypes such as:

  • CRM Deal

  • CRM Lead

  • CRM Product

Whenever I try to open Document Naming Settings, I get the following error:

DocType CRM Deal not found
DocType CRM Lead not found
DocType CRM Product not found

It seems that some references to CRM DocTypes are still present in the system (possibly in Document Naming Settings or cache).

What I have already tried:

  • Cleared cache (bench clear-cache)

  • Restarted bench

  • Verified app is uninstalled (bench list-apps)

  • Tried accessing via UI but form crashes

Any guidance on safely removing these references would be highly appreciated.

Thanks!

Hi @Manish_Kumar

Try

bench --site yoursite migrate

Those missing DocTypes are usually still referenced in Document Naming Rule / Property Setter / Singles after uninstalling CRM.

Try:

bench --site yoursite console

Then check/remove CRM entries from naming settings tables, or via SQL:

delete from `tabDocument Naming Rule` where document_type in ('CRM Deal','CRM Lead','CRM Product');
delete from `tabProperty Setter` where doc_type in ('CRM Deal','CRM Lead','CRM Product');

Then run:

bench --site yoursite clear-cache
bench --site yoursite migrate

If uninstall was partial, reinstalling CRM once and uninstalling cleanly can also fix leftover references.