TableData Sales Invoice Header=rimd

Ok. I understand (sort of) security on objects. This little snippet is part of the properties of codeunit 315. I know that this would be useful for security, but can someone tell me why it’s in this codeunit? The only thing it does is update the no. printed on the sales invoice header. If I leave this snippet on the codeunit then I can never save my codeunit again. I am a super and end-user. We use Nav 3.6 executables but still truly running 3.10b Native DB. I had heard it could possibly be a bug but I have no confirmation. I can delete the line and its fine. If I delete it however I can never re-insert it. Should I worry about deleting it? Why is it there? Thanks Again, Owen

I think you answered your own question but you didn’t realize that. This is the codeunit that increments the “No. Printed” field when you print a Posted Sales Invoice. As you probably already know, no users (not even super users) have permission to modify records in this table. But if you check the permissions for the security group “S&R-Q/O/I/R/C, POST” (which is what you would associate with an user who manages the posting of sales invoices), there will be Indirect Insert and Modify permissions for the Sales Invoice Header table. This means an user can’t just access a record from this table (through a form or directly on the table) and modify it’s contents. They can only modify records through an object with explicit permissions for this purpose. That’s why when you print an invoice, this codeunit gets called in order to increase the “No. Printed” - because it has the correct set of permissions to perform this action. Try deleting this property from the codeunit and then try printing a Posted Sales Invoice. You will get a permission error. PS: Actually, it is possible to directly modify records on the table but you what you need ios not super user access, you need a special development license.

Thanks very much Nelson. I had a feeling that was the case but didn’t know if I were to have a problem (at a later date) if I changed these permissions. Best Rgds, Owen