We are using Navision 4.00 executables, with 3.60 (GB) objects.
We have been running perfectly for a long time but today the system suddenly stopped loading form 330 (Main Menu) for certain users because of a permission error generated by codeunit 1 (ApplicationManagement).
The error was ‘You do not have permission to read the Company Notes Setup table’. The users in question didn’t have the required permission but this wasn’t an issue yesterday.
The problem has been solved by adding the appropriate permissions but it worries me that this has occured. I am assured (!!) that nothing has changed on the clients, servers or databases.
If a table has no records in it so is empty any permissions check will just work.
If a table gains a record, in this case by somebody going into the “company notes setup” then the permissons check is done, so in this case every user will need read permissons to the table.
so add read permissons to the all group or delete the record from the “company notes setup”.
You are right that at the start of the problem there was a blank record in the table, however I removed this and the problem still remained. It may have been a caching issue however. I will try it again now the service has been restarted.
Following the trail set by triff and TonyH I discovered that although the record in ‘Company Notes Set-up’ had been deleted as soon as the problem occured this didn’t prevent the permission error. This is because when deciding whether read permission is required on a table (as per triff’s observation) it uses the information in the ‘Object’ table rather than looking at the table itself - seems logical as this is going to be much quicker.
Deleting the final record in a table doesn’t remove the entry in the Object table, it just sets the ‘No of Records’ field to zero. Navision must check whether the object table contains information for the table in question, rather than whether there is any data in the table, when deciding on whether to apply permission check.
I deleted the entry in the ‘Object’ table (almost certainly not advisable in normal/production circumstances) and the problem was solved.
The situation surrounding how the record was in ‘Company Notes Set-up’ in the first place is a separate matter.