Job Queue Error Messages in NAV 2018

Hi Team,

I wrote some CAL code for updating my approval entry table for multiple users approvals for documents in a workflow.

ImprestHeader.CALCFIELDS("Pending Approvals");
IF (ImprestHeader."Pending Approvals" = 1) AND (ImprestHeader."Request Status" = ImprestHeader."Request Status"::"Pending Approval") THEN BEGIN
  Approval.RESET;
  Approval.SETRANGE("Table ID",52121500);
  Approval.SETRANGE("Document No.",ImprestHeader."No.");
  IF Approval.FINDFIRST THEN BEGIN REPEAT
    IF (Approval."Sequence No." = 2) AND (Approval.Status = Approval.Status::Open) THEN
      Approval.VALIDATE(Status,Approval.Status::Canceled);
    Approval.MODIFY;
    COMMIT;
    UNTIL Approval.NEXT = 0;
    END;  
END;

I also follow this link: https://www.myerrorsandmysolutions.com/you-do-not-have-the-following-permissions-on-tabledata/

By the way it was working fine in the test server but with error messages in the live server with job queue reports:

  • The follow SQL error was unexpexted:
    Time-out occurred while waiting for buffer latch type 2 for page (1:266641582), database ID 5.
  • The following SQL error was unexpected: this SqlTransaction has completed, it is not longer usable
  • You do not have permission on Approval Entry Table: Modify.( the users are Full License as License type, Super as permission set in the user card).5

What can I do to solve these error messages.

Thanks

Solved.

Client license didn’t permit me to modify approval entry table with a report except codeunit. Thank you.

There could be multiple reasons for this.

Licensing is the one which you figured out.