Questions tagged [userinfo]

Contains methods for obtaining information about the context user.

Filter by
Sorted by
Tagged with
1
vote
1answer
41 views

LWC: Get UserInfo using Lightning Data Service

I am playing around with Lightning Web Components and I was wondering if there is a way to pull the UserInfo.getTimeZone() using Lightning Data Service? I was thinking along the lines of: import ...
-1
votes
1answer
43 views

UserInfo.getUiThemeDisplayed returns Theme4t in in mobile and no useful theme information

I know that I can use UserInfo.getUiThemeDisplayed() to get the current theme displayed to the user. This works in lightning and classic. However when I am in mobile mode, I just get "Theme4t" (as ...
0
votes
1answer
115 views

Get current user's IP address in a Login Flow

How can you get the IP address using a global variable or by querying some kind of a setup record? I've looked at LoginHistory.obj, LoginIP, LoginGeo, but none of them show current data. $UserInfo ...
0
votes
1answer
173 views

Is UserInfo.getUserId() always the current user where bulkifying needs to be handled?

I know you must Bulkify your code. Does this mean you have to expect UserInfo.getUserId() to be different users? I.E. Can the same trigger can be called on multiple records for multiple users in the ...
1
vote
1answer
2k views

How to get the profile name and role name from User object

We already have a soql query to retrieve the User object (which returns the role id and profile id) was wondering if we could retrieve the RoleName and ProfileName from within the same query instead ...
0
votes
1answer
81 views

Exception email alert cites a UserId that doesn't exist in my org

I wrote an apex service (called by my Account Trigger before insert and before update) that runs some complex validation , and it starts by querying for the user record of the running user since the ...
0
votes
1answer
32 views

How do I assign “View all data” permissions to profile for the Organization Object?

How do I assign "View all data" permissions to profile for the Organization Object Declaratively? The object doesn't appear on the profile objects permissions areas. I'm trying to obtain the 18 ...
1
vote
1answer
238 views

Can you access the IP address of the current logged in user through Apex code?

Is there an API for getting the current IP address that you can use in Apex code? I didn't see anything in UserInfo, and I don't want to use the LoginHistory object at all for this.
1
vote
2answers
678 views

UserInfo.getUiThemeDisplayed in a lightning community is returning theme3

I have a lightning component thats used in LEX, Classic, and a community. The component redirects the user to a record detail page after an action occurs. I am trying to implement UserInfo....
0
votes
1answer
35 views

Can you use the developer console while logged in as another user and access information from the original user you logged in from?

So I'm logged in as "Amber," and I have privileges to log in as any user in the system. If I were to log in as "Jessica" and open the developer console, would I still be able to access information ...
3
votes
1answer
974 views

What's the expected behavior of UserInfo.getUIThemeDisplayed()?

Looking for clarification around the getUIThemeDisplayed() method. I have simple VF page that displays the value returned by this method from a corresponding controller and a lightning component on ...
0
votes
1answer
645 views

How to change Salesforce User Interface theme?

How can I change Salesforce User Interface theme? Specifically I want to change the value returned by the UserInfo.getUiTheme() method. There doesn't seem to be a corresponding field on the User ...
3
votes
1answer
823 views

Detecting Lightning User Experience

This Salesforce Documentation suggests that we can detect which User Interface is being displayed by using the $User.UITheme and $User.UIThemeDisplayed global variables and the UserInfo.getUiTheme() ...
12
votes
2answers
540 views

Debug log is filled with USER_INFO

My debug log is completely filled with USER_INFO. I adjusted the log levels in all possible combinations hoping to get rid of this. But that didn't help. Can some one please help me understand what ...
3
votes
1answer
35 views

Getting the UserID of the loggedIn user instead of an api user

We have an issue since we moved to a data quality tool. When you create a record in Salesforce you get the logged in user as the one that created and last modified the record. With data quality tool ...