Move Deleted Document Records to Archive Table

You can configure settings to archive the deleted document records instead of permanently deleting them when you create or edit a document type. When the archive setting is enabled, the deleted document records for the document type are moved to the HR_DOCUMENTS_OF_RECORD_ARCHIVE table.

Archive Settings

These are the fields used to archive the deleted document records:
  • Archive Criteria Basis: By default this LoV is blank. You can select either the Creation Date, From Date, To Date, or Issued On.
  • Archive After Days: By default this field is blank. It’s a mandatory field where you enter a number that’s greater than 0 and less than or equal to 18000. For example, if you enter 2, the document records will be archived 2 days after the date selected for Archive Criteria Basis.

Enable Archive Settings for the Document Type

  1. Navigate to the Setup and Maintenance work area.
  2. In the Tasks panel drawer, click Search.
  3. Search and click the Document Types task name.
  4. Click the Create icon in the Search Results area.
  5. Enter the document type and select the category.
  6. Under the Document Record Preferences tab, select the value for Archive Criteria Basis.
    Note: Ensure that you have selected the relevant attributes in the Attributes area to match the selected value for the Archive Criteria Basis.
  7. Enter the value for Archive After Days.
  8. Click Submit.

Run the Archive Document Records Process

  1. Click Navigator > Tools > Scheduled Processes.
  2. Click Schedule New Process.
  3. In the Name drop-down list, search and select the Archive Document Records process.
  4. In the Process Details dialog box, search and select the document type parameter for whose document records you want to archive.
  5. Click Submit, and click OK in the Confirmation dialog box. Note the process ID.

Points to Consider

  • By default, the Archive Criteria Basis isn’t selected in the Document Type setup page, and therefore the deleted document records aren’t moved to the HR_DOCUMENTS_OF_RECORD_ARCHIVE table.
  • To select the Archive Criteria Basis (Creation Date, From Date, Issued On, and To Date), you need to select the matching attributes from the Attributes area under the Document Record Preferences tab. If the matching attributes aren’t selected, you will receive a validation error.
  • When you enable the archive setting, the document records are deleted from the HR_DOCUMENTS_OF_RECORD table and moved to the HR_DOCUMENTS_OF_RECORD_ARCHIVE table. The attachments for the document records, if any, will continue to be stored in the FND_ATTACHMENTS table and not moved or deleted.
  • The archive settings work for document records that are deleted using the Document Records page, HCM Data Loader, HCM Spreadsheet Data Loader, and REST API.
  • The archived document records in the HR_DOCUMENTS_OF_RECORD_ARCHIVE table will be marked with the archive date.