I think this is the case with the other "posted tables" as well, as I have seen a few discussions on this. This is a system permissions error, when I have the SUPER permission set, and have allocated this specific permission to my user as well. I have also generated an .al file permission set as well, with the error still presenting itself.
Please see the below code I have. I have many variations that I have tried to get the data on the Sales Cr.Memo Line to modify/update (second screenshot is the error):
On the vast majority of tables (when your user has the correct permissions) this is never an error that occurs, but on all "posted" tables this seems to be a common theme. Does anyone have a way that they have found to be able to modify data using the modify() procedure for this table or other tables that present this error when using that procedure?
Thanks.
action(Test) { Caption = 'Test'; ApplicationArea = All; trigger OnAction() var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; Salescrmemolines: Record "Sales Cr.Memo Line"; begin Salescrmemolines.Reset(); Salescrmemolines.SetRange("Document No.", SalesCrMemoHeader."No."); Salescrmemolines.SetRange(Type, Salescrmemolines.Type::Item); if Salescrmemolines.Findset() then repeat Salescrmemolines."Unit Cost" := Salescrmemolines."Orbus Unit Cost"; Salescrmemolines."Unit Cost (LCY)" := Salescrmemolines."Orbus Unit Cost"; Salescrmemolines.Modify(); // this is the line where system permission error occurs until Salescrmemolines.Next() = 0; end; }