function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Karthi_VeluKarthi_Velu 

DescribeTabs in Apex Code:

I want get the WebTab URL from Apex Controller. I got a  describeTabs Link Example But i iam getting Error SysLog:

 

19:04:27 ERROR - Compile error: Invalid type: DescribeTabSetResult

 

In Eclipse IDE: Invalid type: DescribeTabSetResult  

 

Code:

private void describeTabSet (){  try {    DescribeTabSetResult[] dtsrs = binding.describeTabs();    System.out.println("There are " + new Integer(dtsrs.length).toString() +                        " tabsets defined.");    for (int i=0;i<dtsrs.length;i++) {      System.out.println("Tabset " + new Integer(i + 1).toString() + ":");      DescribeTabSetResult dtsr = dtsrs[i];      String tabSetLabel = dtsr.getLabel();      String logoUrl = dtsr.getLogoUrl();      boolean isSelected = dtsr.isSelected();      DescribeTab[] tabs = dtsr.getTabs();      System.out.println("Label is " + tabSetLabel + " logo url is " + logoUrl + ",                 there are " + new Integer(tabs.length) + " tabs defined in this set.                 This tab is selected: " + isSelected);      for (int j=0;j<tabs.length;j++) {        DescribeTab tab = tabs[j];        String tabLabel = tab.getLabel();        String objectName = tab.getSobjectName();        String tabUrl = tab.getUrl();        System.out.println("\tTab " + new Integer(j + 1) + ": \n\t\tLabel = " +            tabLabel + "\n\t\tObject details on tab: " + objectName + "\n\t\t" +           "Url to tab: " + tabUrl);      }    }  } catch (Exception ex) {    System.out.println("\nFailed to describe tabs, error message was: \n" +                        ex.getMessage());  } 

}

 

Thanks in advance for your valuable suggestion. 

Best Answer chosen by Admin (Salesforce Developers) 
Karthi_VeluKarthi_Velu
Yes, This is the code belong SFDC WebService to get the web tab url.

All Answers

kwukwu

Hi did you ever find a solution for this? I believe we are not able to make this call in Apex. Only through the API.

Karthi_VeluKarthi_Velu
Yes, This is the code belong SFDC WebService to get the web tab url.
This was selected as the best answer