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
MagulanDuraipandianMagulanDuraipandian 

how to get Application name using Apex?

 how to get Application name using Apex?

 

Regards,

Magulan D

CoolSurenCoolSuren

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.

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_userinfo.htm

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;
    }