Hi everyone, I'm starting with navision and I have a question. I'm trying to create a simple page to print receipt, and I need to fill the "Document No" field with the "Document no" of my cash receipt journal with the name "GENÈRICO".
I cant figure how to do this, because I'm printing the "Document no" always empty or with "Não".. anyone can figure why?
My code:
OnOpenPage()
MESSAGE('%1',LastGenJnlLine."Document No.");
MESSAGE('%1',LastGenJnlLine.GET("Document No."));
Rec."Document No." := LastGenJnlLine."Document No.";
Where LastGenJnlLine is a global of type record, linked to "Gen Journal Line" table.
Answers
Within the GET function, you have to specify the key values only. For the General Journal Line, the primary key fields are Journal Template Name, Journal Batch Name and the Line No.