Hello
Thank you for the reply. I have copied one of error events in the below.
--------------------------------------------------
Error deleting document from DBXL (DocType = 'OrderRecordForm', DocId = 2163) encountered a critical error and needs attention:
System.Exception: The DELETE statement conflicted with the REFERENCE constraint "FK_InvoiceHeaderList_OrderHeaderList". The conflict occurred in database "JAM_Data", table "dbo.InvoiceHeaderList", column '台帳ID'.
The statement has been terminated.
Caught exception populating items from XRefItems table. Query String: DELETE FROM [OrderHeaderList] WHERE DocID IN ( @p0 )
at Qdabra.Dbxl.Domain.DocumentType.DeleteTargetDBItems(SqlConnection conn, SqlTransaction sqlTran, Int32 docID, String tableName, String lookupListXml)
at Qdabra.Dbxl.Domain.DocumentType.DeleteDocumentFromTables(Document doc)
The stack trace was: at Qdabra.Dbxl.Domain.DocumentType.DeleteTargetDBItems(SqlConnection conn, SqlTransaction sqlTran, Int32 docID, String tableName, String lookupListXml)
at Qdabra.Dbxl.Domain.DocumentType.DeleteDocumentFromTables(Document doc).
----------------------------------------------------------------
Since I have setup SharePoint Listenner, we usually delete documents from SharePoint Site, it is working for other other document type. In regard with this document type, I have redesigned the form which query/show document file name (such as 2163 in the above error message, which is refered as "台帳ID"). We create invoice form (other document type) which has dynamic query based on file name of OrderRecordForm in the above error. Then, when we go back to OrderRecord Form, we can get table of invoices based on this OrderRecord Form (I have used qRules v2.0 here) because one OrderRecord Form relates to several Invoices (Invoice Form).
When I have noticed that the OrderRecord Form is not updating information, I decided to delete all of documents (there were about 10 documents in document library in WSS). I have deleted from WSS, and I have checked DAT. And I have noticed there was one document remained. Probably, the document was what I have tested to show file name and table of invoices after I have redesigned. That is the brief story of this document type. If you need more information please let me know.
Thanks