How to set custom object data visibility based on security roles (CX SALES)?
I need to filter data in a custom object by using an SQL filter inserted into a security role
I want to filter the data in a custom object based on the value of one of its fields (for instance 'FIELD').
Users will be given two specific security roles: 'ROLE_STD' (which will be given to ALL users) and several different 'ROLE_****' roles that will identify the value of FIELD and, in this way, they will exclusively see the records that contain that specific value of FIELD.
For instance, if a user is given the security role 'ROLE_VALUE1', the user should only access the records with FIELD equal to VALUE1. I inserted a filter condition in a new Data Security Policy in 'ROLE_****' but, since there will be more than a hundred 'ROLE_****' roles, this way would take too much time to be implemented.