Has anyone had the situation where they needed to control user access to certain “abilities” within a form - e.g. To allow/disallow on a Sales Order the ability to sell for less than the goods cost
Ok. I also meant to ask if so, how do you implement the solution.
Exactly what do You want to do?
I recently implemented something along these lines by modifying the OnValidate trigger for “Sales Line”.“Unit Price” to check the entered price against the item’s average cost. If the price is less than cost, a form is presented that tells the user the entered price, the average cost, and prompts for entry of a user ID and password (there was a nice discussion recently in this forum about validating entered passwords againt the User table). If the password is OK then the user ID is checked against a table of valid users. This could be a simple as a check in the “Member Of” table; my case was a bit more involved because certain users were athorized for certain items, so I had to create a table to relate items to users. If the user is not authorized to sell below cost or the password is invalid then an error is generated.
Hi All, OnOpenForm: if USERID <> ‘DFINANCIER’ THEN CurrForm.Bloqueado.ENABLED := FALSE; It’s more simple manage it with roles.
We have a solution that more or less does the same. A little less simple, than Agustins example. Just with tables to manage user groups and departmential access. I.e. some users where only allowed to see their own data, others all data from the department and again others could see it all. But we also based it on the onOpenForm trigger. Best regards, Erik P. Ernst, webmaster Navision Online User Group