web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

OnAfterPostGenJnlLine: Applies-to Doc. No. becomes blank for additional retained VAT / IRIS lines

(0) ShareShare
ReportReport
Posted on by 235

Hi All,

I am customizing General Journal posting in Microsoft Dynamics 365 Business Central to automatically create and apply Retained VAT and Retained IRIS entries.

What I'm doing?

> I subscribe to OnBeforePostGenJnlLine to:

Create retained VAT and retained IRIS journal lines

Pass the original Applies-to Doc. No.

I subscribe to OnAfterPostGenJnlLine to:

Apply the posted payment entries to the original invoice using

VendEntry-Apply Posted Entries

 

Problem

It seems that:

OnAfterPostGenJnlLine is triggered per posted journal line

The retained lines do not carry forward the original Applies-to Doc. No. automatically,

I had tried by storing it into variable and creating dictionary as well still it doesn't stores data.

Questions

  • Is OnAfterPostGenJnlLine the correct event to apply retained VAT / IRIS entries?


  • How can I reliably preserve or retrieve the original Applies-to Doc. No. for retained entries?

 

Any guidance or best-practice approach would be appreciated.

 

 
I have the same question (0)
  • Gerardo Rentería García Profile Picture
    25,280 Most Valuable Professional on at

    Hi, good day
    I hope this can help you, and give you some hints.

    Events discoverability - Business Central | Microsoft Learn

    Best Regards
    Gerardo

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,135

#2
YUN ZHU Profile Picture

YUN ZHU 733 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 612

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans