• Alexia Marques 29
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
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 have a requirement that need to create an object name Files, where its need to put some file, the name for this register and which accounts will see this files or if all accounts will see. I understand that's a many to many relantionship, because um many files could have many account, as wll many accounts could have many files, it's that right?

I think about many to many with master detail relantionship with junction object, but I don't know if it's the best choice, and also, how to handle with the visibility issue, like, a logic to create a permission set or sharing rule by the trigger of this junction object?

I'm mistaken on my think? It's there another option? How to find the best approach to problems complicated like that?