After the Spring 20 release my validation rules that make use of the field "$UserRole.DeveloperName" are triggering when they should not.

I'm currently trying to create a case from a community (with a Customer Community User), through a flow, and I keep receiving the same error of FIELD_CUSTOM_VALIDATION_EXCEPTION, because the field "$UserRole.DeveloperName" could not be accessed.

When I deactivate all the rules that make use of this field reference, the flow works right. I know that the problem is not the validation rules, because I've tested all the situations on last Friday (03/01) and it was working perfectly, and today (06/01) the org was updated, and nothing is working anymore.

Is anyone else facing the same issue? How to get through it? I need those validation rules, so keeping them deactivated is not really an option.

  • 2
    Are these guest users? A guest user doesn't have a UserRole. Why do you think this is a Winter 20 update? PROD release date was October 19, 2019
    – cropredy
    Jan 6, 2020 at 18:16
  • I know the last release was October 19, but I initially thought about a possible update because the loading icon has changed, and also some other things changed as well, like the standard warning that appear with the error message of the validation rules, you know? But it may be other thing Jan 6, 2020 at 19:37
  • 1
    it is true there are patch releases; you can check trust.salesforce.com to see if one was recent for your pod
    – cropredy
    Jan 6, 2020 at 19:42
  • 1
    Can you confirm its winter 20 or Spring 20 release in sandbox? Jan 6, 2020 at 19:59
  • I have just noticed that actually is Spring 20, not Winter 20 Jan 6, 2020 at 20:18

1 Answer 1


This could be an issue due to the Spring 20 Security update.

This is documented here

As per the update

Access to user roles is available for users with the View Roles and Role Hierarchy permission. Editing user roles is available for users with the Manage Roles permission.

So your rule might be breaking due to it.

One solution i can think of is you might need to switch to custom permissions due to this update if these permissions are not available for community users

  • Do you know if this is some kind of error/bug, or this was something expected to happen, and all the validation rules should now make use of the custom permissions instead of $UserRole.DeveloperName? Jan 7, 2020 at 13:40
  • 1
    I think it is not a bug , it's a security update but unfortunately broke validation rules. Jan 7, 2020 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.