function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Matt FolgerMatt Folger 

Guide for what the options are on the "$User" call...?

Hi everyone!

I'm not finding "$user" (minus the quotes) in the 3000+ page Salesforce Developer guide, nor am I finding it in this forum.  I know that certain calls can be made with the $User.ID, or $User.XYZ?  I'd like to know what a comprehensive list of those looked like so I coudl use them in a Validation Rule that I'm working on and just to have them for reference.  Any help appreciated!  They must be somewhere!
Best Answer chosen by Matt Folger
VaasuVaasu
Apostrophe. :)
AND(ISCHANGED(OwnerId), $User.ProfileId='00ed0000000W7uZ')

All Answers

VaasuVaasu
You can access most of all standard fields on user object. For example $User.Alias
Matt FolgerMatt Folger
Lol, just noticed that this was in the field insert function.  I think it's time for more coffee.  Can't believe I missed that.  =^D

Anyway I'm having trouble with the following validation rule now
 
AND(ISCHANGED(OwnerId), $User.ProfileId=00ed0000000W7uZ)
I don't want specific Profiles to be able to Change the Owner of a record, even if they own it.  However this AND function keeps on asking for more parathenesis.  I keep giving it more ")"s and        "("s but it won't be made happy. 

Any ideas?
=]
VaasuVaasu
Apostrophe. :)
AND(ISCHANGED(OwnerId), $User.ProfileId='00ed0000000W7uZ')
This was selected as the best answer