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
pat!pat! 

Get Application Name

How can I determine the current Application Name?

 

(e.g. Is it Sales? Call Center? Custom Application?)

 

Thanks!

Pat

bob_buzzardbob_buzzard

Unfortunately I don't believe there's a way to get at this through Apex code. There is a describeTabs method in the web services API that looks like it would give you the information you are after, but I've not been able to find an equivalent in Apex.  

 

 

Jeffrey Clark 32Jeffrey Clark 32
public static string getCurrentApplication() 
{ 
   // Get tab set describes for each app 
   List<Schema.DescribeTabSetResult> tabSetDesc = Schema.describeTabs(); 
       for(Schema.DescribeTabSetResult tsr : tabSetDesc) 
           if (tsr.isSelected()) return tsr.getName(); 
   return null; 
}