function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Anna D EdsonAnna D Edson 

Grant users access to only certain data values throughout an entire app

I am working on a custom app that has a Table with Cost Centers (3 digit codes assigned to G/L Accounts) and another table with G/L Accounts..

I need to be able to grant users access to only certain Cost Centers throughout the entire app, for example:

Users: Mike, Mary
Cost Centers 100, 200, 300, 400
G/L Accts: 100-600000, 200-600000, 200-601000, 300-600000, 400-600000

User Mike should be able to see only those G/L Accounts with Cost Centers 100 & 200
User Mary should be able to see only those G/L Accounts with Cost Centers 300 & 400

Mike can see G/L Accts: 100-600000, 200-600000, 200-601000
Mary can see G/L Accts: 300-600000, 400-600000

This should work in any Form or Report. What is the best way to implement this?
Dario BakDario Bak
Quick Solution:
- Create a public group per cost center. Add users that cann see accounts for that cost center. 
- Create a sharing rule using criteria: cost center = 100 (example). This rule applies to the group of cost center 100 users

If this works, please mark this response as best answer!

May the force.com be with you...
 
Anna P EdsonAnna P Edson
Unfortunately, Public Groups needs admin rights and I need this to work for a Standard User, also, we are using Public Groups for other things non-data related. Otherwise, the structure would work perfectly for what I need.

This may require custom programming and I am OK with that if anyone else can suggest how to do it.

Thanks!!!