Skip to main content

Deploying the Archive Viewer & Connector

Learn how to access the Archive Viewer in your Salesforce organization

Callum Whitfield avatar
Written by Callum Whitfield
Updated over a week ago

Gearset's Archive Viewer allows non-Gearset users to view archived records outside of Gearset. To be able to do this within Salesforce, the archive viewer connector must be deployed into your organization in one of two ways: automatically through Gearset or manually.

What is the Archive Viewer?

Put simply, the Gearset Archive Viewer is a window into your Gearset archive. A typical use case is to allow non-admin users to view Archived records within Salesforce.

What is the Archive Viewer Connector?

The Archive Viewer Connector is a bundle of metadata that once deployed to your organization, connects to the Archive Viewer from Salesforce and allows users to see archived records.

Under the hood, the archive viewer connector consists of a few metadata items:

  • A lightning web component (gearsetArchivedRecordsViewer) which can be added to a record lightning page to show related archived records. This contains an iframe which allows looking into the archive.

  • An Apex class (GearsetArchiveViewerController) that allows us to send requests securely to and from your archive.

  • A named and external credential (Gearset Archive Viewer) which stores the API token which grants access to your archive.

  • A permission set (GearsetViewArchivedRecords) that controls which users can see the viewer within Salesforce.

The archive viewer connector itself can be downloaded within the Gearset app.

Automatically deploying the Archive Viewer Connector

We recommend deploying the Archive Viewer Connector automatically. This uses Gearset to perform a deployment that adds the required metadata to the organization associated with your archive.

Since this is a deployment of metadata, this will show in your Deployment History within Gearset and within Salesforce. You may prefer to deploy the archive viewer connector manually to either push the changes through a pipeline or to manually upload the relevant metadata.

Within the archive viewer setup, this can be done by checking the "deploy automatically" option and clicking Deploy.

In a few moments, this should update to show that the archive viewer connector has been deployed successfully.

If you receive an error stating that the Archive Viewer Connector could not be deployed, then you can either try again or try to deploy the metadata manually.

Manually deploying the Archive Viewer Connector

To put the archive viewer connector metadata through a Gearset pipeline, or to deploy to your organization manually, you first must download the metadata. To do so, select Download & deploy manually and click Download zip.

This will begin downloading a ZIP containing the Archive Viewer Connector metadata in a standard Salesforce project structure.

There are a few methods to deploy this package. Either through Gearset by using Compare & Deploy or through other means like Workbench. When the metadata is deployed, ensure to enable running the Apex tests to ensure the code has the correct coverage. Specifically, you will need to run the GearsetArchiveViewerController_Test suite.

To verify that the Archive Viewer Connector has been installed, verify that there exists the metadata listed above in your organization.

Troubleshooting Archive Viewer Connector deployments

Problems deploying the Archive Viewer Connector occur due to various reasons. The most common are detailed below, but if your issue is not found here, please contact our support team and we'll be happy to help.

The deployment failed validation

Since the Archive Viewer Connector metadata contains an Apex class, we must run the appropriate tests in order to pass validation with the correct code coverage. If your deployment failed due to validation, then it implies that you are running the incorrect test suite. You must choose to run only the GearsetArchiveViewerController_Test suite (you may choose to run all tests provided your organization already has the required test coverage).

How do I know if the Archive Viewer Connector was deployed?

You should see a deployment within your Salesforce organization if the archive viewer was deployed. If you deployed automatically through Gearset, then the deployment will also be shown in your Deployment History within Gearset. To verify the correct metadata was added, refer to the above list of metadata that should be included.

Did this answer your question?