Mapping Codeunit 10201 “Transfer Custom Fields” to Events (NA Only)

By Steve Krisjanovs

Below is a list of all COD10201 external functions and where I believe their event equivalents live in. There were three functions in the list below that had me stumped so a second set of eyes would be helpful.

I do still believe that BC’s out of the box COD10201 should still have been modified by MS to indicate that all of these external functions are dead.

The problem I encountered, was because nothing has changed with this codeunit from NAV to BC (the codeunit exists, but all objects that used to call this codeunit no longer do that in BC), the NAV merge tools merged/upgraded our legacy modified cod10201 without any issues since it couldn’t find any conflicts. This could have been an avoidable scenario e.g. if the BC functions in this codeunit threw a runtime error at the beginning of each function call (e.g. “Depricated! Use {event pub object type} {event pub object ID}.{event pub name}”) our merge tools would have caught the conflict and I could have investigated much sooner in my merge/upgrade efforts.

  • [External] GenJnlLineTOGenLedgEntry(VAR GenJnlLine : Record “Gen. Journal Line”;VAR GenLedgEntry : Record “G/L Entry”)
    • maps to COD12.OnAfterInitGLEntry
  • [External] GenJnlLineTOTaxEntry(VAR GenJnlLine : Record “Gen. Journal Line”;VAR TaxEntry : Record “VAT Entry”)
    • maps to COD12.OnBeforeInsertVATEntry
  • [External] GenJnlLineTOCustLedgEntry(VAR GenJnlLine : Record “Gen. Journal Line”;VAR CustLedgEntry : Record “Cust. Ledger Entry”)
    • maps to COD12.OnAfterInitCustLedgEntry
  • [External] GenJnlLineTOVendLedgEntry(VAR GenJnlLine : Record “Gen. Journal Line”;VAR VendLedgEntry : Record “Vendor Ledger Entry”)
    • maps to COD12.OnAfterInitVendLedgEntry
  • [External] GenJnlLineTOBankAccLedgEntry(VAR GenJnlLine : Record “Gen. Journal Line”;VAR BankAccLedgEntry : Record “Bank Account Ledger Entry”)
    • maps to COD12.OnPostBankAccOnBeforeBankAccLedgEntryInsert
  • [External] BankAccLedgEntryTOChkLedgEntry(VAR BankAccLedgEntry : Record “Bank Account Ledger Entry”;VAR CheckLedgEntry : Record “Check Ledger Entry”)
    • maps to COD12.OnPostBankAccOnBeforeCheckLedgEntryInsert
  • [External] VendLedgEntryTOCVLedgEntryBuf(VAR VendLedgEntry : Record “Vendor Ledger Entry”;VAR CVLedgEntryBuf : Record “CV Ledger Entry Buffer”)
    • maps to TAB382.OnAfterCopyFromVendLedgerEntry
  • [External] CVLedgEntryBufTOVendLedgEntry(VAR CVLedgEntryBuf : Record “CV Ledger Entry Buffer”;VAR VendLedgEntry : Record “Vendor Ledger Entry”)
    • maps to TAB25.OnAfterCopyVendLedgerEntryFromCVLedgEntryBuffer
  • [External] CustLedgEntryTOCVLedgEntryBuf(VAR CustLedgEntry : Record “Cust. Ledger Entry”;VAR CVLedgEntryBuf : Record “CV Ledger Entry Buffer”)
    • maps to TAB21.OnAfterCopyCustLedgerEntryFromCVLedgEntryBuffer
  • [External] CVLedgEntryBufTOCustLedgEntry(VAR CVLedgEntryBuf : Record “CV Ledger Entry Buffer”;VAR CustLedgEntry : Record “Cust. Ledger Entry”)
    • couldn’t identify a suitable event mapping
  • [External] ItemJnlLineTOItemLedgEntry(VAR ItemJnlLine : Record “Item Journal Line”;VAR ItemLedgEntry : Record “Item Ledger Entry”)
    • COD22.OnAfterInitItemLedgEntry
  • [External] ItemJnlLineTOPhysInvtLedgEntry(VAR ItemJnlLine : Record “Item Journal Line”;VAR PhysInvtLedgEntry : Record “Phys. Inventory Ledger Entry”)
    • maps to COD22.OnBeforeInsertPhysInvtLedgEntry
  • [External] ItemJnlLineTOValueEntry(VAR ItemJnlLine : Record “Item Journal Line”;VAR ValueEntry : Record “Value Entry”)
    • maps to COD22.OnAfterInitValueEntry
  • [External] JobJnlLineTOResJnlLine(VAR JobJnlLine : Record “Job Journal Line”;VAR ResJnlLine : Record “Res. Journal Line”)
    • maps to TAB207.OnAfterCopyResJnlLineFromJobJnlLine
  • [External] JobJnlLineTOItemJnlLine(VAR JobJnlLine : Record “Job Journal Line”;VAR ItemJnlLine : Record “Item Journal Line”)
    • maps to TAB83.OnAfterCopyItemJnlLineFromJobJnlLine
  • [External] JobJnlLineTOGenJnlLine(VAR JobJnlLine : Record “Job Journal Line”;VAR GenJnlLine : Record “Gen. Journal Line”)
    • couldn’t identify a suitable event mapping
  • [External] JobJnlLineTOJobLedgEntry(VAR JobJnlLine : Record “Job Journal Line”;VAR JobLedgEntry : Record “Job Ledger Entry”)
    • legacy NAV called from this from COD1012.CreateJobLedgEntry(…) but there doesn’t appears to be any suitable event pub in BC
  • [External] ResJnlLineTOResLedgEntry(VAR ResJnlLine : Record “Res. Journal Line”;VAR ResLedgEntry : Record “Res. Ledger Entry”)
    • maps to COD212.OnBeforeResLedgEntryInsert

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.