# Archiving Documents

Many organizations have large archives of documents that are no longer relevant in day-to-day operations. The Document Archive feature supports this by:

  * Allowing users to archive documents in a variety of ways
  * Providing the _Archive_ document field (Yes/No) that indicates if a document is in the archive
  * Excluding archived documents in standard searches
  * Hiding archived documents in the Library and in other document tabs
  * Blocking actions that would modify an archived document
  * Providing a standard tab where you can find archived documents
  * Providing permissions to ensure that only authorized users can access archived documents

## How to Enable Archiving

You can enable the Document Archive feature by selecting the **Enable Document Archiving** checkbox from **Admin > Settings > Search Settings**. Once enabled, Admins cannot disable this feature.

## How to Archive Documents

When you archive a document, the hidden **Archive** (`archive__v`) document field is set to _true_. If you later un-archive a document, the field is set to _false_. This field is standard on all document types, but is hidden and not directly editable through the UI.

You can archive (or un-archive) documents through:

  * The **Archive Document** and **Unarchive Document** options in the document **Actions** menu
  * Vault Loader and <a class="external-link " href="https://developer.veevavault.com/api/26.1/#Update_Documents" target="_blank" rel="noopener">Vault API<i class="fa fa-external-link" aria-hidden="true"></i></a> by setting the **Archive** (`archive__v`) field to `true`.
  * Bulk document actions, using the **Archive Documents** and **Unarchive Documents** settings

## How to Archive Documents Using Bulk Actions

You can use bulk document actions to make changes on up to 1,000 documents at once. See <a href="/en/gr/18822/">Using Bulk Document Actions</a> for information on how to select documents for editing and for general information on bulk actions.

The **Archive Documents** action is available when you select documents from anywhere but the **Archive** tab. When selecting documents from the **Archive** tab, the **Unarchive Documents** action is available.

  1. From the **Choose Action** page, select **Archive Documents** or **Unarchive Documents**.
  2. Click **Next**.
  3. From the **Confirmation** page, review the summary of changes.
  4. Click **Finish**. When the changes are complete, a notice will appear in your **Notifications** page and Vault will send you an email.

## Archive Icon {#archive-icon}

Any document that you archive displays the archive icon in document tabs and in the Doc Info page.

## How to Search Archive Documents

Searches will automatically filter out archived documents, but you can choose to include these documents using Advanced Search. From there, set the **Search Archive** setting to _Yes_.

If you are on the _Archive_ tab, you can directly search only archived documents in the search bar.

## Effects of Archiving

When a document is in the archive, certain actions are blocked:

  * Editing document fields
    * The values cannot be edited but may change for the following reasons:
      * Lookup fields display the latest information from the source fields
      * Labels for picklist values and object references are dynamic
  * Adding or removing document relationships
  * Adding or removing attachments
  * Adding or removing renditions
  * Adding, removing, editing, or importing annotations
  * Importing document links
  * Running the *Suggest Link*s action or accepting pending links (allows users to reject pending links)
  * Adding, removing, or editing document-level comments
  * Re-rendering the document
  * Checking out the document
  * Starting a workflow
  * Moving a document to a new lifecycle state
  * Reclassifying a document
  * Executing user actions
  * Seeing or executing SDK user actions
  * Deleting the document (allowed with _Power Delete_ permission)
  * Deleting document versions (allowed with _Power Delete_ permission) 
  * Veeva Training and Veeva Study Training: Removing a _Vault Document Training Requirement_ record's documents (Training Materials) 

There are also automatic changes that Vault makes to a document after a user archives it:

  * Sets the document's _Merge Fields_ value to _No_ to prevent changes
  * Binds the current version for CrossLink documents to prevent changes
  * Populates the _Archive Date_ document field

## Related Permissions

The following permissions control access for archiving documents and working with archived documents:

|Type|Permission Label|Controls|
|--- |--- |--- |
|Security Profile|Application: Search: View Archive|Ability to view documents in the archive, search the document archive, and view the standard _Archive_ tab; note that users must also have the document role permission _View Document_.|
|Security Profile|Application: Search: Manage Archive|Ability to archive or unarchive documents by default. This permission is granted through the Vault Owner and System Admin permission sets.|
|Security Profile|Tabs: Archive|Ability to view the standard _Archive_ tab if you also have the above permission.|
|Security Profile|API: Access API|Ability to complete an API call, which is needed to archive documents via the Vault API.|
|Security Profile|Vault Owner: Actions: Vault Loader|Ability to see and use the Loader tab to update the _Archive_ field on documents.|
|Security Profile|Document: Bulk Update|Ability to access bulk document actions in order to archive or unarchive documents.|



<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: Users with <a href="/en/gr/5721/">Read-only or External license types</a> cannot view or access the <em>Archive</em> tab, even if their security profile grants the appropriate permissions.</p>
    </div>
  </div>
</div>



## Limitations

The following limitations apply to archiving functionality:

  * Bulk document actions cannot archive or unarchive CrossLink documents. You must use the Vault API or the document **Actions** menu for CrossLinks.
  * Documents in Planned state cannot be archived. Move these documents to a non-special state if you wish to archive them.

 [3]: #note-document-field-value-changes
