1

I have couple of custom fields

Tuser_c Checkbox Tdate_c Date

I want to have the tdate field to be required if the Tuser is true

AND( $User.Tuser__c ,ISNULL( $User.Tdate__c ))

This doesnt fire the validation rule when i leave Tuser_c as true and leave the TDate_c blank(Nothing entered in the field)

Is there something i am missing

2
  • As mast0r mentioned in his answer, the validation rule works without the $user reference. Any reason why it wouldnt work with the $user reference?
    – Prady
    Apr 24, 2013 at 10:35
  • 1
    All $variables are related to "who's looking at the data" (current user, his profile, his role, his session id... Hierarchical custom settings fall here as well) or simply some cached data (custom labels). All the rest is hard "what the data is". So - what were you trying to do? Allow only certain users to perform edits? Or check if the lookup to user stored on the record meets some condition? Looks like it's a data rule and not "who's editing" rule - so without $user.
    – eyescream
    Apr 24, 2013 at 10:56

1 Answer 1

1

I would try to use ISBLANK and remove $User reference:

AND(Tuser__c, ISBLANK(Tdate__c))
9
  • That didnt work too :(
    – Prady
    Apr 24, 2013 at 10:14
  • @Prady Is it for the User object? Apr 24, 2013 at 10:17
  • Yup, its user object
    – Prady
    Apr 24, 2013 at 10:22
  • @Prady I've tried this without $User reference. In my Org it works fine. Updated my example. Apr 24, 2013 at 10:25
  • ok let me try removing the $user
    – Prady
    Apr 24, 2013 at 10:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .