You need to sign in to do that
Don't have an account?
Alexia Marques 29
How to provide visibility to users based on field criteria?
How to provide visibility to records for users based on field criteria? My demand is: When I have some specific object Files with some specific products the users that are contacts in this accounts that has this products will see this register of Files. Like:
- I create a register on the object File with the field product fill with 'B'';
- The account with some specific record type also has the field product fill with 'B' and 'C';
- Because of that, the contacts (that are user in the community) present on this account will have access to the object File, because of the it's contains 'B'.
How to reach this solution? I think about a trigger on the object File that will check the accounts that contains the same product, and then, create a sharing rule for that, but I don`t know if is the best option and also, because of the limit of 300. It`s that any other way?
- I create a register on the object File with the field product fill with 'B'';
- The account with some specific record type also has the field product fill with 'B' and 'C';
- Because of that, the contacts (that are user in the community) present on this account will have access to the object File, because of the it's contains 'B'.
How to reach this solution? I think about a trigger on the object File that will check the accounts that contains the same product, and then, create a sharing rule for that, but I don`t know if is the best option and also, because of the limit of 300. It`s that any other way?
I'd use custom sharing vs sharing rules.
please go through mentioned link below.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_bulk_sharing_creating_with_apex.htm