I am attempting to create following rule: if Utiltiy (look up field) = abc then ONLY allow certain users to edit these date fields date field1 and date field2. Following rule doesnt work..... ***i logged in as user NOT specified in the following rule i was able to edit the date fields. The rule should only allow users specified below should be able to edit the date fields.

    Utility__c = 'PREPA - PR',
    $User.Id  <> "005E00000050ir2",
    $User.Id  <> "005E0000006kdYD"
  • Please edit your question to clarify what you mean by "doesn't work."
    – Adrian Larson
    May 11, 2016 at 0:06
  • Perhaps it is not a duplicate, but that post has some good advice for how to build a user specific validation that works across environments.
    – Adrian Larson
    May 11, 2016 at 0:17

1 Answer 1


Use Utility__r.Name = 'PREPA - PR'. I'd recommend to create a hierarchial Custom Setting's checkbox field and assign true to the users you want to bypass this validation - any hardcoded Id is not good

  • 1
    I believe you mean Utility__r.Name?
    – Adrian Larson
    May 11, 2016 at 0:15
  • Utility__c is lookup field and it should be selected utility=PREPA - PR
    – Suja
    May 11, 2016 at 0:22
  • only certain users should be ab;e to edit the date fields if the lookup filed utility=PREPA - PR,
    – Suja
    May 11, 2016 at 0:23
  • please let me know if i am specifying the Utility__c = 'PREPA - PR', incorrectly
    – Suja
    May 11, 2016 at 0:24
  • @Suja lookup fields are storing Id value, they are just displayed as a name with hyperlink
    – o-lexi
    May 11, 2016 at 0:24

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