Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Check Value in External Document inside General Journal if its existing in GL Entry (posted) or Not

Posted on by 140

ear guys,

i need to make code to check value for External Document No. in enter the value in journals or while posting the journal line to checks the value if its already posted in G/L Entry or not.


Best Regards,

*This post is locked for comments

  • Verified answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Check Value in External Document inside General Journal if its existing in GL Entry (posted) or Not

    When you do a post you need to select it as a question. I changed it you so can check now a link on every post which says

    Did this answer your question?

    Yes

  • Suhail Profile Picture
    Suhail 140 on at
    RE: Check Value in External Document inside General Journal if its existing in GL Entry (posted) or Not

    Dear @Suresh Kulla ,

    Thanks for your guidance was very helpful to me, i really appreciate that.

    Best Regards,

    *Regarding verifying the discussion i cant find the "Yes" to verify it.

  • Verified answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Check Value in External Document inside General Journal if its existing in GL Entry (posted) or Not

    Check this link how events work and how to subscribe

    In your case, you need to subscribe to the event in the codeunit 12 or codeunit 11, either before posting or after checking the lines in the codeunit 11.

    https://docs.microsoft.com/en-us/dynamics-nav/introducing-events

    Also, check the function CheckPurchExtDocNo in the codeunit 12 which has similar logic but it looks at Vendor Ledger Entry, in your case you need to check GLEntry. 

  • TeddyH Profile Picture
    TeddyH 12,868 Super User 2024 Season 1 on at
    RE: Check Value in External Document inside General Journal if its existing in GL Entry (posted) or Not

    There is an External Document No Mandatory setup in Sales & Receivables Setup and Purchases & Payable Setup. Is that not enough ?

  • Suhail Profile Picture
    Suhail 140 on at
    RE: Check Value in External Document inside General Journal if its existing in GL Entry (posted) or Not

    Great,

    im new in coding can you help on building the condition code for this issue

  • Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Check Value in External Document inside General Journal if its existing in GL Entry (posted) or Not

    You need to add the subscriber to the OnBeforePostGenJnlLine event in the codeunit 12 and add the check.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans