SQL, Record Level Locking & Security Filter

From v3.01 onwards, on the permissions table you can specify what conditions apply to the records in a given table. For e.g.I can use this to control which customers are shown to a user based on salesperson code or posting group of the customer. I also found a function called SETPERMISSION FILTER. I wonder if this function allows us to set the security filter at runtime, instead of at the permissions table. If this were so, then we could achieve higher access control - I could make the system show only customers, sales orders, invoices etc. belonging to a particular salesperson. (I would still have to link the USERID & Salesperson code). Has anyone used this function? I cant fully figure out the usage from the reference guide. Anyone with experience, please enlighten me.