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

how to get Application name using Apex?

 how to get Application name using Apex?



Magulan D


Hi magu,


  I think there is no standard methods to get the Application name in Apex. anyway refer the following link for some standard userinfo methods.

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;