DescribeIconResult Class

Contains icon metadata information for a tab.

Schema

The getIcons method of the Schema.DescribeTabResult class returns a list of Schema.DescribeIconResult objects that describe colors used in a tab.

The methods in the Schema.DescribeIconResult class can be called using their property counterparts. For each method starting with get, you can omit the get prefix and the ending parentheses () to call the property counterpart. For example, iconResultObj.url is equivalent to iconResultObj.getUrl().

This sample shows how to get the icon information in the Sales app for the first tab’s first icon.

The following are methods for DescribeIconResult. All are instance methods.

  • getContentType()

    Returns the tab icon’s content type, such as image/png.

  • getHeight()

    Returns the tab icon’s height in pixels.

  • getTheme()

    Returns the tab’s icon theme.

  • getUrl()

    Returns the tab’s icon fully qualified URL.

  • getWidth()

    Returns the tab’s icon width in pixels.

Returns the tab icon’s content type, such as image/png.

public String getContentType()

Type: String

Returns the tab icon’s height in pixels.

public Integer getHeight()

Type: Integer

If the icon content type is SVG, the icon won’t have a size and its height is zero.

Returns the tab’s icon theme.

public String getTheme()

Type: String

Possible theme values include theme3, theme4, and custom.

  • theme3 is the Salesforce theme introduced during Spring ‘10.
  • theme4 is the Salesforce theme introduced in Winter ‘14 for the mobile touchscreen version of Salesforce.
  • custom is the theme name associated with a custom icon.

Returns the tab’s icon fully qualified URL.

public String getUrl()

Type: String

Returns the tab’s icon width in pixels.

public Integer getWidth()

Type: Integer

If the icon content type is SVG, the icon won’t have a size and its width is zero.