Inserting records in Gen. Journal Line

poppinspoppins Member Posts: 647
edited 2013-08-12 in NAV Three Tier
Hi everyone,

I want to insert lines in table 81 (Gen. Journal Line).
I can't understand how the values of Journal Template Name, Line No. and Document No. are generated.
I looked into codeunit 80 and 90, but couldn't figure it out...

Can anyone help me understand it?

Comments

  • poppinspoppins Member Posts: 647
    I am not inserting my records directly with page 39(General Journal) but trough code in another page....
  • postsauravpostsaurav Member Posts: 708
    Hi Poppins,

    If you check codeunit 80 and 90 you will find out that GenJnlLine is created in codeunit 80 & 90.
            GenJnlLine.INIT;
            GenJnlLine."Posting Date" := "Posting Date";
            GenJnlLine."Document Date" := "Document Date";
            GenJnlLine.Description := "Posting Description";
            GenJnlLine."Reason Code" := "Reason Code";
            GenJnlLine."Sale Return Type" := "Sale Return Type";
            GenJnlLine."Document Type" := GenJnlLineDocType;
            GenJnlLine."Document No." := GenJnlLineDocNo;
    

    Once genJnlLine is created it is passed to codeunit 12 via function
    GenJnlPostLine.RunWithCheck(GenJnlLine,TempJnlLineDim);
    

    Then it get posted via codeunit 12.

    Let me know if you have any issues.

    Thanks & Regards,
    Saurav Dhyani

    Do you Know this About NAV?


    Connect - Twitter | Facebook | Google + | YouTube

    Follow - Blog | Facebook Page | Google + Page
  • thegunzothegunzo Member Posts: 274
    Hi Poppins,

    Report 94, Close Income Statement is also a good source to look at if you want to create general journal lines.
    ________________________________
    Gunnar Gestsson
    Microsoft Certified IT Professional
    Dynamics NAV MVP
    http://www.dynamics.is
    http://Objects4NAV.com
Sign In or Register to comment.