Salesforce Dictionary — Free Salesforce GlossarySalesforce Dictionary

Logged-in User

Core CRM🟢 Beginner

Definition

The currently authenticated Salesforce user whose session is active, referenced in formulas as $User. Their permissions, profile, and role determine their data access and available features.

Real-World Example

At their company, a business analyst at Clearwater Inc. leverages Logged-in User to improve how the organization tracks relationships and interactions. By setting up Logged-in User properly, the team gains better visibility into their customer base, which leads to more informed decisions and stronger customer relationships across the board.

Why Logged-in User Matters

The Logged-in User in Salesforce is the currently authenticated user whose session is active. This is the user whose permissions, profile, role, and other settings determine what data they can access and what features they can use. In formulas, the logged-in user is referenced as $User (with sub-fields like $User.Id, $User.UserName, $User.ProfileId), letting admins build context-aware logic that adapts based on who's using the system.

Knowing the logged-in user is foundational to many Salesforce features: sharing rules determine what records they see, profiles determine what objects and fields they can access, and field-level security determines which fields are visible. In Apex code, the logged-in user is accessible through UserInfo.getUserId() and similar methods. Mature Salesforce designs use the logged-in user concept extensively to personalize the experience without hardcoding values that would need to change for different users.

How Organizations Use Logged-in User

  • TerraForm TechUses $User.ProfileId in validation rules to apply different validation logic based on which profile the logged-in user has.
  • NovaScaleFilters list views to show only records owned by the current user with the 'My Records' style of filtering.
  • CodeBridgeUses UserInfo.getUserId() in Apex to implement record-level access checks based on the logged-in user.

🧠 Test Your Knowledge

1. What is the Logged-in User?

2. How is the logged-in user referenced in formulas?

3. How is it accessed in Apex?

See something that could be improved?

Suggest an Edit