Skip to main content

Questions tagged [userinfo]

Contains methods for obtaining information about the context user.

Filter by
Sorted by
Tagged with
0 votes
0 answers
45 views

Collect Tracking Code userInfo email shows undefined

I am trying to use the Collect Tracking Code to get the user ID that viewed any page on my website, y have this code window.dataLayer = window.dataLayer || []; window._etmc = window._etmc || []; . . . ...
gjanez's user avatar
  • 1
0 votes
1 answer
520 views

UserInfo: protecting access token (GET vs POST)

I've noticed when using the official Postman collection, the parameters for any methods have to be put as parameters in the URL, otherwise the status code received is 400. I've tried debugging it, so ...
DevelBase2's user avatar
3 votes
1 answer
896 views

Is possible to have UserInfo.getUserId() as null?

I am wondering if there is any scenario where UserInfo.getUserId() will return null? Will the following SOQL always return some row? User user = [SELECT Id, Name FROM User WHERE Id = :UserInfo....
Piotr Gajek's user avatar
  • 2,784
0 votes
1 answer
2k views

Method does not exist or incorrect signature: void getUserName() from the type UserInfo

I dont know what is the problem. When I am trying to use UserInfo.getUserName() in my main org it doesnt work and gives me error like in title, but in another org it works perfectly. What can I do? So ...
Terdivi's user avatar
  • 51
1 vote
1 answer
502 views

Is there a way to know in Apex if the user's mobile number has been verified?

Or can i know if that number was entered at "Advanced User Details"(verified) or "Personal Information"(maybe not verified)? I want to check them before using "Auth....
t-f-21's user avatar
  • 61
0 votes
0 answers
39 views

How can I tell where a user logged in to an Experience Site? [duplicate]

I have an experience site where Customer Community Users can sign up, log in, and add items to their cart for purchase. Is it possible to recognize someone who logged in to this Experience Site as a ...
conejo's user avatar
  • 15
1 vote
2 answers
948 views

How do I get the logs (results) of executing anonymous Apex code in jsforce?

I have been trying to execute the following Apex code in jsforce (Node.js): var apexBody = "System.debug(UserInfo.isMultiCurrencyOrganization());"; conn.tooling.executeAnonymous(apexBody, function(...
Sumit Israni's user avatar
-2 votes
1 answer
172 views

UserInfo.getUserId() returns a invalid id [closed]

I get the return values as <\a href="0054F000002TICN" target="_blank">Abhishek Mendon<\/a> when I use UserInfo.getUserId() to set the a user id for another object.
Abhishek Mendon's user avatar
1 vote
3 answers
3k views

How to find first day of the week by locale?

I have a LWC that displays a calendar, which calls to APEX and the class returns all the data needed to fill the calendar. By default, the data is returned where Sunday is the first day of the week. ...
PatMcClellan__c's user avatar
4 votes
2 answers
7k 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 ...
Arthlete's user avatar
  • 4,957
-1 votes
1 answer
491 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 ...
peter's user avatar
  • 3
0 votes
1 answer
2k 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 ...
Kirill Yunussov's user avatar
0 votes
1 answer
2k 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 ...
shmuels's user avatar
  • 575
1 vote
1 answer
31k 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 ...
user2359997's user avatar
1 vote
1 answer
627 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 ...
OBerm's user avatar
  • 1,234
0 votes
1 answer
106 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 ...
Boots's user avatar
  • 319
1 vote
1 answer
585 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.
cryptobox's user avatar
1 vote
1 answer
1k 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....
TemporaryFix's user avatar
  • 2,946
0 votes
1 answer
682 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 ...
cryptobox's user avatar
4 votes
1 answer
3k 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 ...
Brand0R's user avatar
  • 1,054
0 votes
1 answer
1k 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 ...
Sourabh Coolkarni's user avatar
3 votes
1 answer
1k 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() ...
Suryatej Mukkamalla's user avatar
12 votes
2 answers
603 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 ...
Avinash's user avatar
  • 2,111
3 votes
1 answer
45 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 ...
Sven Delporte's user avatar