The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
46 views

If I create a user in a testmethod, I cannot select them with SOQL in the same testmethod. How can I work around this?

I am creating a test method to test functionality allowing users to search for other users. In order to do this, I have tried creating and saving test users with certain criteria, and then searching ...
1
vote
2answers
45 views

How can I create an owner lookup field similar to change owner on any record

We have a request for a field to show a referral from internal sales users. I thought rather than a picklist that we would have to constantly manage, maybe there was a way to use the built in user ...
3
votes
1answer
84 views

Invalid field Username on User : SOQL Query

I simply cannot understand the reason why I am getting this below error. 17:16:15.106 (1106785435)|SYSTEM_METHOD_EXIT|[29]|system.UserInfo.getUserId() 17:16:15.107 ...
5
votes
1answer
59 views

Opportunity.LastModifiedBy is null

I found reference to an invalid user in a sandbox yesterday: LastModifiedById on an opportunity had a Salesforce ID that was not available in the org, and opp.getSObject('LastModifiedBy') returns ...
0
votes
1answer
29 views

No sorting is applied on the list. Create user not coming as first record

Login to salesforce with admin . Go to manage users . click on manage users . Create a user from new user button. Expected Result: After creating the user should show as first record. The list ...
0
votes
0answers
19 views

Salesforce Identity Connect and AD user management

If a user is deleted from Active Directory, is the corresponding user record deleted or simply deactivated from Salesforce data store?
2
votes
0answers
37 views

How to update the current login user

I have a custom field over my user object. And I want to update this user by the contact id from apex. How can i update the user record in salesforce. Because when I trying to update the field of ...
2
votes
1answer
194 views

How to enable customer community users via apex

We have person accounts in our org. to whom we need to give access to our customer community at various stages of an opportunity. Is there a way we can programmatically enable our person accounts as ...
5
votes
1answer
221 views

Developer console updates current user's User record

We have noticed that Developer Console does some kind of an update on the current user's User record. When that happens, our User trigger is invoked, but with what seems limited permissions, and we ...
2
votes
1answer
205 views

How Do I populate the Last Login Date from User object into a custom object/field? [duplicate]

Aim – Pull the last login date from the user object into my custom object and populate a particular field Now I am under the impression that LastLoginDate on the user object is not accessible through ...
2
votes
1answer
143 views

Are lookup fields on the User object (e.g. to Contact) supported by the platform?

Aim – i need to have a lookup field on the user object which looks @ the contact object and only returns values where the email address is @domain.com Now i am under the impression that no lookups ...
0
votes
2answers
74 views

How to turn off Receive Salesforce CRM Content Alerts as Daily Digest flag on user creation

In my apex code for creating a user, I'm setting the following flags which according to the documentation should turn off email alerts for content users UserPermissionsSFContentUser = false, ...
4
votes
2answers
414 views

Add a button on User detail page

How to add my custom button on User detail page? I've created a VF page with User standardController. I've created a button in "Edit User Custom Button or Link". This button appears in layout. But I ...
0
votes
1answer
137 views

How Do I Display Additional Detail On User Hover Card

I want to show the city on the hoover card in the chatter app when my users hoover over the name. Anyone know how i fix that?
4
votes
1answer
249 views

New Customer Portal user email even when triggerUserEmail = false

I'm trying to write an Apex web service that can create a customer portal user. After creating the user, there is a separate step which does a password reset for the user and sends them an email. The ...
7
votes
4answers
102 views

Can users be stopped from editing their own user record?

Is there any way to restrict a user from updating their user details (first name, last name, email etc...)? Revoking CRUD access to the user object does not stop this. Currently users can navigate to ...
0
votes
0answers
47 views

Partner Users cannot access User lookups

We have a situation with our partner users such that SFDC doesn’t allow partner users to access user records in user lookup fields on the opportunity. The affect is that they are unable to ...
1
vote
1answer
574 views

Apex dynamically assign new records to users using trigger

I'm a young Apex developer. I have a quick question: I would like to dynamically assign new records to users using an Apex trigger. As we know, every new created records are automatically assigned to ...
1
vote
2answers
43 views

how to reinsert old records from excel file in salesforce production edition [duplicate]

I have old records and i want to reinsert it now. i having a contacts and their spendings e.g like by year 2006- abc 2007 -abc now i want to add 2005 records from excel ...
1
vote
1answer
768 views

Mysterious OP_WITH_INVALID_USER_TYPE_EXCEPTION, Operation not valid for this user type: []

I had following situation. When I tried to edit and save some of custom object CustomObject1__c instance, I received error in the top of the page Error: Invalid Data. Review all error messages below ...
3
votes
1answer
58 views

How can I get an overview of a users ownership and usage?

I am trying to get an overall view of a users ownership in SF. e.g. - How many accounts/leads/opptys a certain user has. I wanted to use rollup summary, but can't. In the user's page, all I see is ...
1
vote
1answer
110 views

Customer Portal Self registration and User trigger

Will trigger (before insert) on User object fire when a customer portal user registers using customer portal self registration?
2
votes
1answer
243 views

Assigning Records via a trigger on User Object

Aim- In this example https://www.youtube.com/watch?v=QrtVN8vZGJU you can see that “Jim Smith” is going through the de-activation process . What i want to do, is when you press save, an apex trigger ...
4
votes
1answer
80 views

Does 'pnet' in a user's Id have any special meaning?

I am working on an app and in one of the triggers there is this exotic bird: if( UserInfo.getUserId().indexOf('pnet') != -1 ) { return; } Looks terribly hard coded or is there a general rule ...
3
votes
1answer
350 views

access records based on user id - roles setup

I am new to Salesforce, and need an advise. We are planning to create a custom object and custom tab for it. Now, we want user to be able to access only his/her record, or records related to him. For ...
3
votes
1answer
244 views

Processing only new records in a batch apex

I want to process only the new records in a batch Apex. We can query the new records in a trigger by Trigger.new . Is there any means by which we can query only the newly created data items and ...
4
votes
3answers
97 views

Detect and eliminate existing duplicate accounts, contacts and Opp for Professional Edition

I am using SF Professional edition have been Searching a free app to detect and eliminate the duplicates mainly for the Accounts, Contacts and Opportunities. Most of the free apps tends to search ...
5
votes
1answer
251 views

How to Store data as per role Hierarchy and hierarchical Rollup in SFDC

I Need to Store Number fields per used based on User role Hierarchy and need to do hierarchical Rollup later on once data is updated. Did anyone tried to do this in Salesforce. One Approach I am ...
6
votes
1answer
490 views

Different user IDs across production and sandboxes - how to make them the same for every user?

Normally users across production and sandboxes have the same unique user ID, given that you created the production user first, and then refreshed the sandbox. We have the case that we created users ...
1
vote
2answers
2k views

How do we get all the users who are part of public group of current logged in user?

I want get a list of all the users who are part of public group of the currently logged in user. From what i have read on the documentations, i should be able to pick these values from group and ...
2
votes
1answer
123 views

How to get all emails within the organization?

I'm making an application that needs to retrieve all the emails in the organization. Currently, I only get the email of one particular person, i.e. the one who install's the application. How do I get ...
5
votes
1answer
628 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 ...
4
votes
1answer
512 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 ...
7
votes
2answers
1k 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 ...
6
votes
1answer
149 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
485 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
2k 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
139 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
245 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
266 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 ...
3
votes
3answers
1k 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
191 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 ...
4
votes
1answer
427 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 ...
6
votes
2answers
4k 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 = ...
7
votes
4answers
3k 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
733 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 ...
2
votes
2answers
138 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
416 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
380 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
795 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 ...