Calling a function of CodeUnit B from within CodeUnit A?

NAV_1909NAV_1909 Member Posts: 12
I am trying to call a function found within a codeunit (codeunit B) from within another codeunit (codeunit A).

Can someone tell me where I might find an example of this?

I know that this is a vague request, but I am trying to learn and I like to see examples of good coding in use.

Thank you all!

Comments

  • bbrownbbrown Member Posts: 3,268
    You will find many example of this in Navision.

    Declare Codeunit B as a variable of CodeUnit A.

    An Example form Codeunit 80


    IF SalesShptLine."Item Shpt. Entry No." <> 0 THEN
    DistributeCharge :=
    CostCalcMgt.SplitItemLedgerEntriesExist(
    TempItemLedgEntry,-SalesShptLine."Quantity (Base)",SalesShptLine."Item Shpt. Entry No.")
    There are no bugs - only undocumented features.
Sign In or Register to comment.