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
Ronaldo Vasconcelos 9Ronaldo Vasconcelos 9 

Problems with TAB Applications

Good evening,

Beforehand I am grateful for any comment that will help find the solution.
I have an application built and created several TABS TABS and one of those is by default set to Default Landing Tab.
My application was asked to exhibit a Popup informing that are private content where there are two buttons:
1 - A button "Accept" accepts and continues the normal flow of the work process;
2 - A button "Refuse" the loggar user Salesforce;
My problem is this, I would call the TAB which was charged as Default Landing Tab, but have not found identifier for the TAB. I did not see how I can call the TAB screen right after you click the button.


Best regards
Ronaldo Vasconcelos
daniel_hdaniel_h
You can use Apex to Describe your Tab Sets (Apps) and Tabs.

This code loops through all the Apps and then the tabs in each app and outputs the label and URL. You could loop until you find the one with the right label. For more information see https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_schema_describetabsetresult.htm​ (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_schema_describetabsetresult.htm)
 
// Get tab set describes for each app
List<Schema.DescribeTabSetResult> tabSetDesc = Schema.describeTabs();

// Iterate through each tab set describe for each app and display the info
for(Schema.DescribeTabSetResult tsr : tabSetDesc) {
    // Get more information for the Sales app            
    List<Schema.DescribeTabResult> tabs = tsr.getTabs();
    for (DescribeTabResult tab : tabs) {
        System.debug('Label:' + tab.getLabel());
        System.debug('URL:' + tab.getUrl());
    }
}