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.
// Get tab set describes for each app List<Schema.DescribeTabSetResult> tabSetDesc = Schema.describeTabs(); // Iterate through each tab set for(Schema.DescribeTabSetResult tsr : tabSetDesc) { // Get tab info for the Sales app if (tsr.getLabel() == 'Sales') { // Get icon information for the first tab List<Schema.DescribeIconResult> iconDesc = tsr.getTabs()[0].getIcons(); // Display the icon height and width of the first icon System.debug('Height: ' + iconDesc[0].getHeight()); System.debug('Width: ' + iconDesc[0].getWidth()); } } // Example debug statement output // DEBUG|Height: 32 // DEBUG|Width: 32
The following are methods for DescribeIconResult. All are instance methods.
public String getContentType()
Type: String
public Integer getHeight()
Type: Integer
public String getTheme()
Type: String
public String getUrl()
Type: String
public Integer getWidth()
Type: Integer