cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to Delete Document Types?

Niall_Evans
Champ on-the-rise
Champ on-the-rise

We are deleting old Document Type's from an OnBase system we have inherited, all the documents were deleting over a year ago from the DocType and are empty.

When i am deleting the empty document types using the -ROMANZO switch, there are a few DocTypes were a system message pops up saying 'Documents exist for this Document Type - You must purge these documents before you can delete'.

I have checked using the Client and there are no documents in the DocTypes, I have all the permissions, and i have checked document maintenance for documents.

Does anyone have any advice on things to check?

7 REPLIES 7

Not applicable

When you delete the documents, they go into the document maintenance folder.  Have you cleared the document maintenance folder.  If not, then that is your issue.

Niall_Evans
Champ on-the-rise
Champ on-the-rise

HI Sherri,

Yes, thats the first place i looked! Nothing there in these DocTypes!

Niall

Do you have workflows setup?  If so, you could still have some records for these documents in the workflow tables.  Another words you deleted a document that was sitting in a workflow queue.

Scott_McLean
Elite Collaborator
Elite Collaborator

Hi Niall,

It's possible that there are documents that you can't see in the document type (for example, if you're using security keywords). You can directly query the database to identify the documents that the system thinks exist for that document type.

First, identify the document type ID in OnBase Configuration. When you're looking at the document type list with that one selected, the document type ID will appear in the upper right-hand corner. Then run the following query to identify any documents remaining (replace <doc type id> with the doc type number you found above).

SELECT * FROM hsi.itemdata WHERE itemtypenum = <doc type id>

Pay special attention to the status column. The most comon values are 0 (normal) and 16 (deleted - in document maintenance)

You can also check if they are in workflow by using the following query:

SELECT ilc.itemnum, idt.itemname, idt.status
FROM hsi.itemlc ilc
INNER JOIN hsi.itemdata idt ON ilc.itemnum = idt.itemnum
WHERE idt.itemtypenum = <doc type id>

If these queries return any rows, then you have documents in the doc type that you've not yet found.

Kind regards,

-Scott