I have a fairly complex app I'm building which currently has 24 custom objects, 20 of which fall into a Master-detail relationship at the moment but I think I'm going to have to change that.

The problem is that although the objects are all related and should not exist without the master record, I need to control read and edit access to objects below the master which at present I am unable to do with the M/D relationship.

The scenario on a simple level is I have 3 tiers of user access:

Team Owner - CRUD access to all records in app

Team Leader - Read their own, Read their team members, create certain records but only for their team members or themselves

Team Member - Read their own, Possibly read certain records for other team members, create certain records but only for themselves

Ideally on the current master record I would set a number of lookups to user records which would then drive the security. I.e. on a team member lookup the My Team Leader value and having done that give the team leader access to read that record.

Any ideas? Can this be done using standard lookups to build the relationships and apex triggers to create/manage the sharing of those records?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.