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

Community site session details

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

"OnAfterPostPurchaseDoc: Only First Vendor Invoice Posts — Multiple Vendor Invoices Not Posting

(0) ShareShare
ReportReport
Posted on by 190

Hi All,

I’ve built a custom prepayment module where, based on the vendors in the prepayment lines, separate purchase invoices are created and posted during the Purchase Order posting process. The issue I’m facing is that only the first vendor’s purchase invoice is successfully posted.

For each vendor, I’m calling:

PurchPost.Run(PurchInvoiceHeader);  // on line no. 52

However, it seems that I cannot post multiple purchase invoices during the same OnAfterPostPurchaseDoc event. The second (and any additional) vendor invoices never get posted.

Is there an alternative way to trigger multiple invoice postings safely?

 

Kindly find the attached screenshot.


 

I have the same question (0)

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
Jainam M. Kothari Profile Picture

Jainam M. Kothari 3,481 Super User 2025 Season 2

#2
OussamaSabbouh Profile Picture

OussamaSabbouh 3,301

#3
YUN ZHU Profile Picture

YUN ZHU 1,728 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans