Tab Manager (.NET)

The Tab Manager API supports programmatically managing tabs in Relativity. It includes the following features:

  • Supports create, read, update, and delete operations on tabs.
  • Provides helper methods that simplify working with tabs. You can use these methods to retrieve information about the display order of tabs, parent tabs, and available object types that can be associated with tabs. Additionally, you can also retrieve workspace-level metadata for admin and system tabs.

As a sample use case, you might use the Tab Manager service to add specialized tab functionality to custom pages in a Relativity application developed for your organization.

You can also use the Tab Manager API through REST. For more information, see Tab Manager (REST).

The Relativity.DataVisualization.SDK contains this API. For compatibility and package installation instructions, see Download the SDKs and NuGet packages.

Fundamentals for managing tabs

Review the following information to learn about the methods, classes, and other entities used by the Tab Manager API.

Guidelines for using the Tab Manager service

Review the following guidelines for working with the Tab Manager service.

Access the Tab Manager service

You can access the Tab Manager service by creating a client proxy, and then instantiating a TabManager object.

Admin-level context

The methods on the Tab Manager API require that you pass an integer representing a workspace ID. You must pass -1 when you want to indicate the admin-level context. For example, you would pass -1 as the workspace ID to retrieve metadata for system or admin tabs. See Retrieve workspace-level metadata for admin and system tabs.

Retrieve a value from a Task object

When you call a method on the Tab Manager API, it returns a Task object. You can retrieve the data returned in Task object by retrieving an awaiter for the Task object, and then calling the GetResult() method.

Set ParentID property

When creating a tab, you must the set the Parent property. This property is required for tabs at all levels, including tabs created at the admin-level or as parent tabs. For admin-level tabs, set this property to SystemArtifactId.

Use of response data from read operations

You may want to update a tab by using data obtained from a read operation. In the Tab Manager API, the ReadAsync() method returns a TabResponse object. However, the UpdateAsync() method requires that you pass a TabRequest object to it. To use data obtained from a read operation, you need to translate it from the form provided in the TabResponse object to that required for a TabRequest object.

IconIdentifier property

The TabRequest class contains the IconIdentifier property, which represents a string identifier for the icon displayed when a tab appears in the sidebar.

Create a tab

To create a tab, call the CreateAsync() method by passing the Artifact ID of the workspace and a TabRequest object to it.

Retrieve tab metadata

Use the overloaded ReadAsync() method to retrieve basic or extended metadata for a tab. Extended metadata includes operations that you have permissions to perform on the tab, such as delete or update.

For basic tab metadata, call the ReadAsync() method by passing the Artifact IDs of the workspace and the tab. For extended metadata, you can pass Boolean values for both the includeMetadata and includeActions parameters on the overloaded method.

Update a tab

To modify the properties of a tab, call the UpdateAsync() method by passing Artifact ID of the workspace and a TabRequest object to it. This overloaded method also supports restricting the update of a tab to the date when it was last modified. To restrict the update, you must pass a DateTime object to the method as well.

Note: The value for the DateTime object must match the LastModifiedOn date for the tab stored in Relativity. Otherwise, you receive an error, indicating that the object has been modified.

Delete a tab

Use the DeleteAsync() method to remove a tab from Relativity. You must have the permissions to perform a delete operation. For more information, see Security and permissions in the RelativityOne Documentation site.

Before you delete a tab, consider checking for other dependent tabs using Object Manager API. See Object Manager (.NET).

Remove a tab by passing the Artifact IDs of the workspace and the existing tab to the DeleteAsync() method.

Retrieve object types for a tab

When creating an object link type tab, you must associate it with an object. Use the GetEligibleObjectTypesAsync() method to obtain a list of available object types before executing a create operation. It retrieves a list of all object types in a workspace available for creating a tab.

Pass the Artifact ID of a workspace to the GetEligibleObjectTypesAsync() method.

Retrieve eligible parent tabs

Use the GetEligibleParentTabsAsync() method to retrieve a list of parent tabs, which you can associate with a tab when you add or edit it. In the Relativity UI, a parent tab displays a drop-down list containing child tabs.

Pass this method the Artifact ID of the workspace where you want to add the tab or where it currently exists.

Retrieve workspace-level metadata for admin and system tabs

You can retrieve workspace-level metadata about admin and system tabs. This metadata includes fields that can't be updated and those that aren't supported for a specific tab. In general, the following guidelines apply to this metadata:

  • Admin tabs - Because these tabs are supported only for workspaces, the RelativityApplications field is always returned as an unsupported field by the GetMetaAsync() method.
  • System tabs - Because these tabs are part of the core Relativity application, most of their fields can't be updated, and are returned by GetMetaAsync() method as read-only fields, such the Name, Link, and RelativityApplications fields. For example, the fields on the Errors tab are read-only.

Call the GetMetaAsync() method by passing -1 to indicate the admin-level context. See Admin-level context.

Retrieve tab orders

The order assigned to a tab determines its position in the Relativity UI. Tabs with a lower order number are displayed on the left, while those with higher order numbers are displayed on the right. For more information, see Tabs on the RelativityOne Documentation site.

Use the GetViewOrderList() method to retrieve the current order for tabs in a specific workspace. Call this method with the Artifact ID of a workspace. For the order of system or admin tabs, pass -1 instead of an Artifact ID. See Admin-level context.

Retrieve all tabs for navigation

Use the GetAllNavigationTabs() method to retrieve basic information about each tab the calling user can navigate to in a specific workspace. This method returns a URL for navigating to each tab and tab metadata like the tab's name, order, visibility, parent, and other properties.

Call the GetAllNavigationTabs() method by passing the Artifact ID of the workspace.