Spring 20 – Validation rules that use “$UserRole.DeveloperName” are triggering when they should not

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.


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

Source : Link , Question Author : Giulia Mascagni , Answer Author : Mohith Shrivastava

Leave a Comment