Questions tagged [user-record]

This Tag is used to group all queries related to Salesforce user Record

Filter by
Sorted by
Tagged with
6
votes
1answer
3k views

userinfo.getuseremail() returns noreply@salesforce.com in salesforce

I have created a package in salesforce that will make an http callout request with user's email id to get data for that email and add the data to some custom object. But when I tried using UserInfo....
5
votes
1answer
2k views

Retrieve UserId of @mention user from chatter post in Apex

Is there a way to retrieve the user id of @mention user from chatter post in Apex? We can write a before insert trigger on feeditem, but when we display the body (which has @mention user) it simply ...
13
votes
3answers
7k views

Execute an action / run a trigger every time a User logs in to Salesforce

Is there any way to consistently execute a piece of Apex code whenever a User logs in to Salesforce? Posts such as this one seem to suggest that triggers on updates to the User object's 'LastLoginDate'...
6
votes
1answer
252 views

Make packaged test classes which definitely don't fail

I am writing test classes for a managed package which should work in any org. However, for my tests I need to create a test user and I know this can fail in orgs which, for example, have mandatory ...
3
votes
2answers
2k views

Can the User's Last Login date be used in a formula?

I need to calculate the LastLoginDate - Created Date of Users in a formula field. The Last Login Date field is not available here.. Is there a way to get it without having to write code/SOQL?
4
votes
2answers
7k views

how to change email of user in sandbox to something like .sandboxname?

I tried to change an user's active email in my sandbox(Sandbox name:stage) as they didn't want to get further notifications for the actions that we are doing in our environment from : abcd@gmail.com ...
1
vote
1answer
193 views

High Volume Portal User Custom Field on Formula Field

I have created a custom field on the User Object - Canvas_Id__c ... This value is only populated when the user is a high volume portal seat user. I have a custom object Student Task where I want to ...
1
vote
2answers
2k views

ways to add fields to user object

I want to add 10 fields to user object. Shall I add it to User object directly or shall I first create child object of the user object and then add those fields to it? Which one is best approach? any ...
3
votes
1answer
567 views

Render a tab for certain public groups

I have a custom page that overrides the default account page, dividing it into multiple tabs. I was wondering if there was a way to use the "rendered="{!IF($.........." to make the tab available to ...
4
votes
3answers
6k views

Avoiding the password notification to be sent to the User on creation

When i create new user through salesforce UI i dont want the password notification to be sent to the User .Is this possible ?I know one solution is to uncheck the generate Email Notification and new ...
0
votes
2answers
439 views

Updating a User custom field

I have added a custom field of type String to the User standard object. I'm trying to update it from a controller but even though I see the update succeeds in the Debug Log the value is not actually ...
5
votes
1answer
1k views

Prevent majority of users from logging in (+ notification)

I am looking for a way to prevent users from logging in in a certain time span, let's say for a few days after new year's eve to check all data in the system. I thought about the "Login Hours" on a ...
8
votes
1answer
10k views

Creating a user with DML

I have the following Apex code: User mike = new User(); mike.Username= 'mike.white@company.com'; mike.Email = 'mike.white@company.com'; mike.Lastname = 'mike'; mike.Firstname = 'white'; mike.Alias = '...
19
votes
4answers
22k views

What are the possible options for UserType?

The Salesforce docs describe the UserInfo.getUserType() call, which returns the same options as user.UserType. But I can't figure out where to find a list of the possible return values. Please ...
4
votes
2answers
2k views

Can a Workflow Rule be created against a User Record? i.e. send an email alert to their manager once the record is deactivated?

We would like to have an email alert sent to the manager of the departed employee once the user record is deactivated. In that email, we would like to include a link to all that employee's open ...
3
votes
2answers
637 views

User Community Nickname

Community Nickname has to be unique across all users? or it has to be unique within a org? As far as I know, username has to be unique across all Salesforce users in the world. Any thoughts?
1
vote
1answer
579 views

Display Self-Service fields on Contact Object

I would like to display Self-Service Portal fields on the contact object. I need the fields "IsActive" and "Last Login". Is it possible by trigger?
1
vote
2answers
1k views

How can I disable Default Account teams

I am looking to disable Default Account Teams. I was wondering if it could be done out of the box. I have looked into removing the related list but that is not possible since it doesn't give me the ...
7
votes
2answers
2k views

User Trigger while changing the Chatter Profile Picture

The chatter profile picture url is saved in the User FullPhotoUrl field. If we try to modify the picture/upload a new picture in the chatter profile image, the trigger in the user object is not ...
4
votes
2answers
275 views

Is there a way to access all user info?

Is there a way to get a drill down through DB/reports all the info related to an user like permission set sharing settings active/inactive( I can get this by Isactive filter) what public groups he/...
1
vote
1answer
193 views

Bulk Update the “My Social Accounts and Contacts” Preference for all Users

I'd like to enable Social Accounts and Contacts in our org, and then bulk update all Users to NOT have the "Use Social Accounts and Contacts" setting enabled. This would allow me to then send out a ...
3
votes
1answer
1k views

How can I create a Chatter Free License user in a test class?

I am trying to create a user in a test class and this user needs to be a Chatter Free License. Usertype is the field to set the license but this one is not writable. Any pointers on creating a user ...
10
votes
6answers
3k views

Handling Community Nickname field for Customer Portal registration

We have a customized Force.com Site + Customer Portal for the authenticated portion of the Force.com Site. We have self registration enabled. Currently the nickname and alias fields are required on ...
6
votes
5answers
1k views

Best practice for removing former admin user from all records, triggers and workflows?

I'm thinking of using demandtools to find all objects that their account is tied to. Then I was going to test removal and replacement with current admin user in a sandbox environment. Just wondering ...