Export deleted documents

  • Last Post 21 May 2018
Mushvig I. posted this 15 May 2018

Hi, everyone!

I want to export document(s) to PDF file format which is manually deleted in verificaton station. Is it possible? And how to make it?

Thanks in advance!

Best regards

Order By: Standard | Newest | Votes
AlexeyEfremov posted this 17 May 2018


I have tried several workarounds:

You cannot use the Event "Before document delete" for this, because the document is read-only in this event.

You also cannot use User commands for this.

But the workaround would be the following:

1. In the "On Task Window Create" event you disable the Delete command for users:

TaskWindow.MainWindow.EnableCommand(TCommandID.CI_EditClear , false);


2. Create a document processing stage in the workflow that will save the document and mark it for deletion:

IExportImageSavingOptions options = FCTools.NewImageSavingOptions();

options.Format = "pdf";

options.ShouldOverwrite = true;



3. After this stage you place a Batch processing stage with the following script:


foreach(IDocument doc in Batch.Documents)


    if(doc.Properties.Get("MarkedForDeletion") == "true"){





foreach(IDocument doc in Documents)


    if(doc.Properties.Get("MarkedForDeletion") == "true"){




You can also forward the batch afterwards to the Processed station so it can be deleted automatically after some time.

So instead of deleting the documents operator will have to send them to deletion stage in the workflow.

I have tested this workaround in FC12. Let me know if you need a sample project.







Mushvig I. posted this 18 May 2018

Dear Alexey,

I have tried  but it seems that I had made something wrong. Could you please send me a sample project?

AlexeyEfremov posted this 21 May 2018

Hello, sorry for keeping you waiting.

Here is the link: