gsg_team Posted November 18, 2008 Posted November 18, 2008 Hi all, Each client/prospect (about 12,000 records) in our database is assigned to a salesperson. Users in the sales group should only be able to see their own clients but other groups are not limited. I tried achieving this by editing the sales privilege set to be able to view records where the AccountName of the user logged in matches the salesrep username assigned to the client. This does work but without doing a find, the total # of records returned is the full 12000 (not the 150 average you would expect for a sales person) and all of them are browseable but most of them just display "No Access" for all the fields. Isn't there a way to just eliminate these records from appearing to begin with. There's no benefit of being able to scroll through results that all say no access. I also tried making a self relation on the client code and the salesperson and displaying records in the layout for that table occurrence instead and that didn't work. Any suggestions? Thanks
bcooney Posted November 18, 2008 Posted November 18, 2008 I wouldn't match Account Name to Sales Person name in the Client record. I would store an assigned salesperson's staff ID in the client table. On Open, I would Find in the Staff table using Get (accountname) and return the StaffID and store it in a global field in my Main Menu table. Then using a gtrr from Main Menu to clients by Main:gStaffID=Client:Assigned StaffID. This will limit the client list to those that have that person's staff ID. If you allow the Staff person to Find in Clients, they could easily "break out" of their filtered found set. So, any Find script in Clients would need to add to the search criteria their StaffID.
comment Posted November 18, 2008 Posted November 18, 2008 If you allow the Staff person to Find in Clients, they could easily "break out" of their filtered found set. So, any Find script in Clients would need to add to the search criteria their StaffID. Not really: http://fmforums.com/forum/showpost.php?post/296225/ http://fmforums.com/forum/showpost.php?post/225333/
gsg_team Posted November 18, 2008 Author Posted November 18, 2008 Thanks I'll try the GTRR. For the record I do have other relations set up by ID but I only posted the jist of the problem to make it easier to explain.
bruceR Posted November 19, 2008 Posted November 19, 2008 (edited) You do not need a portal or GTRR. Your privilege set setup sounds correct and you only need to change ONE additional thing. All you have to do is change the find all command with custom menus. But you don't appear to have Filemaker Advanced. If you change find all so that it does find "*" in for instance the ContactID field users will only get the records they are allowed to see. You could add this as a startup script or nav script. Any other finds will only find allowed records within the request. Edited November 19, 2008 by Guest
Recommended Posts
This topic is 5847 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now