Hi all,
I'm hoping someone can help me. I'm new with Navision reporting so please forgive me if I sound confusing.
I have a dataitem from the Payroll Ledger Entry table and within that dataitem I'm filling a temp table in the form of the Payroll Journal Line table called PayrollLine.
In the Payroll Ledger Entry ONDataPreItem() I have this:
TransferData(PayrollLine,"Payroll Ledger Entry"); //a function to populate the temp table
SETRANGE("Payroll Control Type","Payroll Control Type"::"Net Pay");
FIND('-');
and in the Payroll Ledger Entry OnAfterGetRecord() I have this:
PayrollLine.SETCURRENTKEY("Employee No.","Document No.");
PayrollLine.SETRANGE("Employee No.","Payroll Ledger Entry"."Employee No.");
PayrollLine.SETRANGE("Document No.","Payroll Ledger Entry"."Check No.");
PayrollLine.FIND('-');
I get an error saying it can't find a record in the Payroll Journal Line table with that filter. But if I filled it from the same table, how I could be getting this error?
I'm not sure if this is enough information to have a response, but any thoughts are appreciated. I'm a little tired of the head bashing. ](*,)
DNeal
0
Comments
PayrollLine.reset;
PayrollLine.SETCURRENTKEY("Employee No.","Document No.");
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
It's one of those popular mistakes, I've seen a lot.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n