I would like to disallow any modification of existing Sales Orders by members of certain roles, however; I would like to allow Sales Order printing by those same members.
I have set the Sales Header table permissions to 'Read Only' for the role(s) pertaining to these members.
I would assume the reason the 'You do not have permission to modify records in the Sales Header table.' warning is displayed when trying to print a Sales Order is because Navision is trying to update the 'No. Printed' field.
Does anyone know of a 'quick and easy' way to get around this?
Thank you.
0
Comments
The result is that your users will still need read permission to run the report but will not have modify permissions to Sales Header (unless when running an object with the permissions defined inside)
I have found that the error is raised by the following block of code found in Codeunit 60 Sales-Calc. Discount\CalculateInvoiceDiscount(SalesHeader,SalesLine2)
IF NOT TemporaryHeader THEN BEGIN
IF NOT RECORDLEVELLOCKING THEN
SalesLine2.LOCKTABLE(TRUE,TRUE);
SalesHeader.MODIFY; <<<<<<< Breaks Here
END;
So what I have done is give the role 'Read Permission' as well as 'Indirect Modify Permission' to the Sales Header table. I have also granted the role 'Full Permission' to Codeunit 60.
Isn't this the point of the Indirect Permission or am I missing something?
Shouldn't the role have access to modify the Sales Header table indirectly via Codeunit 60?
Thanks again.
"Table Data": this is the one that doesn't need execute permission. But here serves read,insert,modify,delete because it is the DATA OF THE TABLE, and not the table-object itself.
So you have to give only execute-permission to a role for C60. And indirect modify (and maybe also read if those users may not even see table 36.37) to T36+T37 + maybe some dependant tables.
In C60 you put permissions for T36,T37,... to read and modify. These are indirect permissions.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
I had given read and indirect modify permissions to Table Data 36 as well as Table Data 37, Execute Permissions are also granted.
I have changed C60 to Execute Permissions only.
Still no success.
Is there some additional code that needs to be inserted into C60 (other than the code listed previously) to open up access to modify the data in Table 37 indirectly?
I must be missing something very simple.
This is extremely frustrating.
Thanks again.