You need to sign in to do that
Don't have an account?
Karthi_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.
All Answers
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.