This site is currently undergoing maintenance, so instances of "RelativityOne" may still be present. You may also experience 404 errors, search disruptions, and temporary style changes.

Last date modified: 2026-Sep-09

Redirecting Relativity Viewers

You can redirect Relativity viewers to display different content. The Review Interface includes the Item Load Transform feature, which allows an extension to modify the content that a viewer displays.

The Review Extensions define IItemLoadTransform objects, including an ItemLoadTransformFn object. This object determines how the viewer is redirected. Use this feature to display an RDO file or a different document in an existing Relativity viewer.

The following code sample illustrates how an extension script redirects the Native Viewer to display a different document:

Copy
(function (parameters) {
  var getDocumentIdToRedirectTo = function (originalDocumentId) {
    // ...
    return someOtherDocumentId;
  };

  return {
    id: "relativity.review.test.viewerTransform",
    name: "Viewer Transform Test Extension",
    itemLoadTransforms: [
      {
        viewerType: "native",
        conflictBehavior: "register",
        transformFn: function (api, viewerCard, item, options) {
          var newItem = item;
          if (item.artifactId) {
            var newId = getDocumentIdToRedirectTo(item.artifactId);
            newItem = api.queue.createDocumentItem(newId);
          }
          return {
            item: newItem,
            options: options,
          };
        },
      },
    ],
  };
})(params);
Feedback