[Event Request] OnBeforePostInvoicePrepayments and OnBeforePostCreditPrepayments on COD442 (Sales-Post Prepayments)
Please add the following event publisher on COD442 (Sales-Post Prepayments):
LOCAL [IntegrationEvent] OnBeforePostInvoicePrepayments(VAR SalesHeader : Record "Sales Header";VAR Handled : Boolean)
This publisher should be called before the call to the function Code in the function Invoice: OnBeforePostInvoicePrepayments(SalesHeader,Handled); IF Handled THEN EXIT; Code(SalesHeader,0);
And the following event publisher also on COD442 (Sales-Post Prepayments): LOCAL [IntegrationEvent] OnBeforePostCreditPrepayments(VAR SalesHeader : Record "Sales Header";VAR Handled : Boolean)
This publisher should be called before the call to the function Code in the function CreditMemo: OnBeforePostCreditPrepayments(SalesHeader,Handled); IF Handled THEN EXIT; Code(SalesHeader,1);
The Handled variables will help us queue and post these prepayments with the Tast Scheduler