Record Level Security

I am developing a solution for a client that includes a table of customer company names and addresses, and a separate table of related contacts. I need to be able to apply some security against certain records as explained below. Would someone be able to give me some idea as to how I could go about achieving this.

Thanks in advance

Our client has requested that they want each of their own branches to be able to see only their own set of customer names and addresses together with associated headquarter names and addresses, and for certain individuals to be able to see all customer names and addresses.

For example, and assume that our client company is called Client:

Client London Branch can see XYZ Customer details
Client Birmingham Branch can see ABC Birmingham Customer details
Client Edinburgh Branch can see ABC Edinburgh Customer details
Client Birmingham and Edinburgh Branches can both see ABC Headquarters details
Client Headquarters can see all of XYZ and ABC details.

The easiest would be:

  1. disable the findAllCmd on the forms that have data you want to hide (so users can’t do control/cmd-J to see somebody else data)
  2. Override the onFindCmd with a custom method:
    in that method:
    fill the fields with the criteria matching the data they are allowed to see
    go into find

best would be to not have the fields that contain the ownership info editable on a layout.

Thanks for that Jan. I will give it a try.

you could also look ath the addFilterFoundsetParam method.
(you can set those on the onload of a form then all the records will be filterd out with what ever search they do)

That looks interesting, I’ll give that a try as well. Thanks.