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 

How to Filter Data to Display in Entry Forms

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?

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

 
Kiran RKiran R
Hello Anna,

A high level i dead be, i would filter this list based on a common criteria for users in one cost center. May be it be a profile or if they do not belong to the same profile, I would put a field on the user indicating which cost centers can he have access to.

and then, create a custom settings to define which users can see what cost centers.

This give me a platform for me in my visualforce page to filter the details to show them approproiately.  Had this been a rule across your org outside of your app, I would have handled this through sharing settings.