Эта статья морально устарела :( . Приглашаю продолжить ваше знакомство с Salesforce на нашем Форуме!
В некоторых ситуациях, когда вам необходимо узнать побольше о конкретном юзере, что бы выполнить ряд операций, то вас может выручить объект UserInfo.
Ниже перечислены его статические методы:
- getDefaultCurrency()
Returns the context user's default currency code for multiple currency organizations or the organization's currency code for single currency organizations.
- getFirstName()
Returns the context user's first name
- getLanguage()
Returns the context user's language
- getLastName()
Returns the context user's last name
- getLocale()
Returns the context user's locale.
- getName()
Returns the context user's full name. The format of the name depends on the language preferences specified for the organization.
- getOrganizationId()
Returns the context organization's ID.
- getOrganizationName()
Returns the context organization's company name.
- getProfileId()
Returns the context user's profile ID.
- getSessionId()
Returns the session ID for the current session.
- getTimeZone()
Returns the current user’s local time zone.
- getUiTheme()
Returns the default organization theme. Use getUiThemeDisplayed to determine the theme actually displayed to the current user.
- getUiThemeDisplayed()
Returns the theme being displayed for the current user.
- getUserEmail()
Returns the current user’s email address.
- getUserId()
Returns the context user's ID
- getUserName()
Returns the context user's login name.
- getUserRoleId()
Returns the context user's role ID.
- getUserType()
Returns the context user's type.
- isCurrentUserLicensed(namespace)
Returns true if the context user has a license to the managed package denoted by the namespace. Otherwise, returns false.
- isMultiCurrencyOrganization()
Specifies whether the organization uses multiple currencies.
(Данные приведены из документации)