get a field from G/L Register to show up in G/L Entry...

demi222demi222 Member Posts: 131
can anyone help?

I want whatever the "No." field of the G/L Register table is to show up in a newly added field in the G/L Entry table...

can anyone help me get started at least?

Comments

  • KowaKowa Member Posts: 925
    Add a field "G/L Register No." to the G/L Entry Table and in
    the end of Function "InitGLEntry" of CU 12 Gen. Jnl.-Post Line add :


    GLEntry."No. Series" := GenJnlLine."Posting No. Series";
    GLEntry."System-Created Entry" := SystemCreatedEntry;
    GLEntry."Prior-Year Entry" := GLEntry."Posting Date" < FiscalYearStartDate;
    // ---
    GLEntry."G/L Register No." := GLReg."No.";
    // +++
    GLCalcAddCurrency(AmountAddCurr,UseAmountAddCurr);
    Kai Kowalewski
  • demi222demi222 Member Posts: 131
    Thank you so much! That was easier than I had expected!! I was searching in all the wrong codeunits!!

    Could I ask you one more thing? Now that I have made the change, and everything works great... how can I update all the records that were done before this change, so that they can get the number also?
  • KowaKowa Member Posts: 925
    edited 2005-04-21
    Create a report with a DataItem for Table 45 G/L Register.
    Create a record variable GLEntry for Table 17 G/L Entry
    In the OnAfterGetRecord write :

    GLEntry.SETRANGE("Entry No.","From Entry No.","To Entry No.");
    GLEntry.MODIFYALL("G/L Register No.","G/L Register"."No.");

    You can set a filter on the G/L Register."No." to test it. It may take very long to run.
    Kai Kowalewski
  • demi222demi222 Member Posts: 131
    Thanks a lot... I'll try it out!

    I appreciate your help! :D
Sign In or Register to comment.