Options

Cant get Document no from General Journal Lines

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".

r6yhyhmumb95.png
kbap78d7hgd9.png

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.

5stjmtndwphs.png
pp1kbhdav9rw.png

Answers

  • Options
    KeptyKepty Member Posts: 54
    Please look at the msdn how to use GET and record variables...

    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.
    Tomáš Kapitán
Sign In or Register to comment.