---
schema_version: "1"
id: 60eb3c50a2c0d8e461d17ba62ff09f0fdfff147220c93bc88f3819033ee01904
title: PermissionSetTabSetting
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_tooling/tooling_api_objects_permissionsettabsetting.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_permissionsettabsetting.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 500921a5df16d102b54a4450d85886d5f3c2d3ee6103a03b87cd9bfc3020a2e7
description: Represents a tab’s settings for a profile or permission set. Use PermissionSetTabSetting for manipulating tab visibility on profiles and permission sets. Available in Tooling API version 37.0 and later.
---
# PermissionSetTabSetting

Represents a tab’s settings for a profile or permission set. Use PermissionSetTabSetting for manipulating tab visibility on profiles and permission sets. Available in Tooling API version 37.0 and later.

## Supported SOAP Calls

create(), delete(), query(), retrieve(), update()

## Supported REST HTTP Methods

Query, GET, POST, PATCH, DELETE

## Special Access Rules

As of Spring ’20 and later, only users with View Setup and Configuration permission can access this object.

## Fields

| Field Name | Details |
| --- | --- |
| Name | 
Type

string

Properties

Create, Filter, Group

Description

The tab’s API name. For standard tabs, the name is in the form “standard-Account”. For custom tabs, it’s the developer name.



 |
| ParentId | 

Type

reference

Properties

Create, Filter, Group

Description

The ID of the permission set to which this tab setting belongs. For profile tab settings, ParentId is the ID of the permission set owned by the profile.



 |
| Visibility | 

Type

picklist

Properties

Create, Filter, Group, Restricted picklist

Description

The default visibility setting for this tab. Valid values are:

- Default Off
- Default On

![Note](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/images/icon_note.png)

#### Note

There’s no _hidden_ value. Instead, a hidden tab is indicated by having no PermissionSetTabSetting row in the database.















 |

## Usage

To hide a tab, delete the associated PermissionSetTabSetting object. ParentId and Name fields can’t be updated.

This example creates a tab setting to make the custom object tab named CustomObject\_\_c visible for the System Administrator profile.

try {
  // Query for the ID of the permission set owned by the System Administrator profile
  String queryString = "SELECT Id FROM PermissionSet
    + WHERE Profile.Name = 'System Administrator'";
  QueryResult queryResult = connection.query(queryString);
  if (queryResult.getSize() > 0) {
    // Construct the tab setting sObject
    PermissionSetTabSetting tabSetting = new PermissionSetTabSetting();
    tabSetting.setParentId(queryResult.getRecords()\[0\].getId());
    tabSetting.setName("CustomObject\_\_c");
    tabSetting.setVisibility(TabVisibility.DefaultOn);
    SObject\[\] sObjects = new SObject\[\] { tabSetting };
    // Create the tab setting
    SaveResult\[\] saveResults = connection.create(sObjects);
    for (SaveResult saveResult : saveResults) {
      if (saveResult.isSuccess()) {
        System.out.println("Successfully created the tab setting.");
        System.out.println("ID: " + saveResult.getId());
      } else {
        Error error = saveResult.getErrors()\[0\];
        System.out.println("Failed to create the tab setting.");
        System.out.println("Status code: " + error.getStatusCode());
        System.out.println("Message: " + error.getMessage());
      }
    }
  } else {
    System.out.println("Failed to find the ID of the permission set.");
  }
} catch (ConnectionException ce) {
  ce.printStackTrace();
}

This example updates the existing tab setting to make the Account tab available instead of visible for the Standard User profile.

try {
  // Query for the ID of the tab setting for the Account tab on the Standard User profile
  String queryString = "SELECT Id FROM PermissionSetTabSetting "
      + "WHERE Parent.Profile.Name = 'Standard User' AND Name = 'standard-Account'";
  QueryResult queryResult = connection.query(queryString);
  if (queryResult.getSize() > 0) {
    // Change the visibility
    PermissionSetTabSetting tabSetting = (PermissionSetTabSetting)queryResult.getRecords()\[0\];
    tabSetting.setVisibility(TabVisibility.DefaultOff);
    // Update the tab setting
    SObject\[\] sObjects = new SObject\[\] { tabSetting };
    SaveResult\[\] saveResults = connection.update(sObjects);
    for (SaveResult saveResult : saveResults) {
      if (saveResult.isSuccess()) {
        System.out.println("Successfully updated the tab setting.");
        System.out.println("ID: " + saveResult.getId());
      } else {
        Error error = saveResult.getErrors()\[0\];
        System.out.println("Failed to update the tab setting.");
        System.out.println("Status code: " + error.getStatusCode());
        System.out.println("Message: " + error.getMessage());
      }
    }
  } else {
    System.out.println("Failed to find the ID of the tab setting.");
  }
} catch (ConnectionException ce) {
  ce.printStackTrace();
}

The example deletes the existing tab setting to make the Account tab hidden for the Standard User profile.

try {
  // Query for the ID of the tab setting for the Account tab on the Standard User profile
  String queryString = "SELECT Id FROM PermissionSetTabSetting "
      + "WHERE Parent.Profile.Name = 'Standard User' AND Name = 'standard-Account'";
  QueryResult queryResult = connection.query(queryString);
  if (queryResult.getSize() > 0) {
    // Delete the tab setting
    String\[\] ids = new String\[\] { queryResult.getRecords()\[0\].getId() };
    DeleteResult\[\] deleteResults = connection.delete(ids);
    for (DeleteResult deleteResult : deleteResults) {
      if (deleteResult.isSuccess()) {
        System.out.println("Successfully deleted the tab setting.");
        System.out.println("ID: " + deleteResult.getId());
      } else {
        Error error = deleteResult.getErrors()\[0\];
        System.out.println("Failed to delete the tab setting.");
        System.out.println("Status code: " + error.getStatusCode());
        System.out.println("Message: " + error.getMessage());
      }
    }
  } else {
    System.out.println("Failed to find the ID of the tab setting.");
  }
} catch (ConnectionException ce) {
  ce.printStackTrace();
}