I am having trouble with the limited record access. I have a database of people. The people can be members of many organizations. A many-to-many relationship from Organizations to People with a join table is utilized for this relationship.
I have a script that can be run while an admistrator is in an organization record to create an account for a person who is a member of that organization.
1. The problem comes when that person is also a member of another organization. I only want to give them access to the organization for which the admin ran the script in, however some people may need access to multiple organizations and I would like to be able to have an admin add that when necessary.
2. Persons may also be assigned to Persons on a many-to-many relationship. The idea is that one of the account privilege sets would allow those accounts to login and view the people assigned to them via this relationship, but only these people.
I am not exactly sure where to start for the organization problem...
For limiting the view for the many to many relationship I figured I should created a new field in the persons table that access the join table to list all of the kf's of assigned people? Then I can set the limited record calculation for this privilege set to only show records where the kp of the person is exists in this list? Is this the correct idea and if so what calculation function would I use to evalutate this? Maybe this is making it too complicated but is it possible to limit the list of viewable people to only those for the organization the account was assigned even if the actual person is apart of several organizations with many people in each organization assigned to them.
Any help or direction would be appreciated.