Can't delete file

I keep getting this error “Cannot delete or cancel because DOCUMENT 1 is linked with DOCUMENT 2” but is not linked in any way. I deleted all the links and values in fields, what’s going on?

Hi @capintervencion,

Please check the step.

  • If any have workflow-related doctype which you want to delete. then remove the workflow for it.
  • If you use the child table, can you link the doctype in the child table? if have then remove it. and check whether the custom field is linked with another doctype or not.

If the above step is clear then reload (Ctrl + Shift + R) and check it.
If not worked then apply commands like:

bench --site [sitename] clear-cache
bench --site [sitename] migrate

If not worked with the command then remove the document from the database.

I hope this helps.
Thank You!