Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

post a data from purchase journal to vendor ledger entries and general ledger entries.

(0) ShareShare
ReportReport
Posted on by 45

I have created one field in purchase journal which is Vendor order no, whenever insert any no in Vendor Order No and after clicked on Post i want data to be inserted in  vendor ledger entries and general ledger entries.

  • Pooja Zinjurke Profile Picture
    Pooja Zinjurke 45 on at
    RE: post a data from purchase journal to vendor ledger entries and general ledger entries.

    Thank you Vaishnavi Joshi it worked

  • Suggested answer
    Vaishnavi J Profile Picture
    Vaishnavi J 3,056 on at
    RE: post a data from purchase journal to vendor ledger entries and general ledger entries.

    Hi,

    Create a code unit object and use event subscriber and write the below logic.

       [EventSubscriber(ObjectType::Table, Database::"G/L Entry", 'OnAfterCopyGLEntryFromGenJnlLine', '', false, false)]

       local procedure OnAfterCopyGLEntryFromGenJnlLine(var GenJournalLine: Record "Gen. Journal Line"; var GLEntry: Record "G/L Entry")

       begin

           GLEntry.Validate(VendorOrderNo, GenJournalLine.VendorOrderNo);

       end;

       [EventSubscriber(ObjectType::Table, Database::"Vendor Ledger Entry", 'OnAfterCopyVendLedgerEntryFromGenJnlLine', '', false, false)]

       local procedure OnAfterCopyVendLedgerEntryFromGenJnlLine(GenJournalLine: Record "Gen. Journal Line"; var VendorLedgerEntry: Record "Vendor Ledger Entry")

       begin

           VendorLedgerEntry.Validate((VendorOrderNo, GenJournalLine.VendorOrderNo);

       end;

    please note you have to add permission on Codeunit object.

     Permissions = tabledata "Cust. Ledger Entry" = RIMD,

                            tabledata "Vendor Ledger Entry" = RIMD;

    If my answer was helpful to you, please verify it so that other users know it worked. Thank you very much

  • Pooja Zinjurke Profile Picture
    Pooja Zinjurke 45 on at
    RE: post a data from purchase journal to vendor ledger entries and general ledger entries.

    I am not able to post the vendor order no  through Purchase Journal in  vendor ledger entries and general ledger entries, can you please suggest how to write code for that through Post Button

  • KTA Profile Picture
    KTA 1,200 on at
    RE: post a data from purchase journal to vendor ledger entries and general ledger entries.

    What's the problem?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,883 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,569 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans