Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [userinfo]

Contains methods for obtaining information about the context user.

0
votes
1answer
27 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
29 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
114 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
41 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
25 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 ...
0
votes
0answers
20 views

Determining if Community User is Authenticated or Not [duplicate]

I have looked around in StackExchange and not found a question that directly asks my question. I have a community that is sitting on top of a site. In apex, I need to know if the user is an ...
0
votes
0answers
316 views

UserInfo.UITheme and UserInfo.UIThemeDisplayed do not seem to be behaving correctly

Preamble: I wanted to report this straight to the Salesforce team, but I couldn't find any way to do this unless I had a higher level of support, so I thought I would put the issue to the Stack ...
1
vote
1answer
174 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
370 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
30 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 ...
2
votes
1answer
747 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
518 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
719 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() ...
13
votes
2answers
528 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 ...