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...
Suggested answer

Working on Prepayment Sales Invoice

(3) ShareShare
ReportReport
Posted on by 229
when i post prepayment from sales order then it posted to posted sales invoice and then when i post sales order it also goes to posted sales invoice now both documents  have empty sales order and no field i found which represent relation between both document in posted sales invoice 
Second Question is negative line automatically we seen in posted sales invoice of prepayment if for that line i want two custom field 
1.LINE TYPE
2. REFERENCE INVOICE NUMBER 
how can i give valueto negative line which not shown before posting
I have the same question (0)
  • Suggested answer
    OussamaSabbouh Profile Picture
    1,142 on at
    Working on Prepayment Sales Invoice
    Hello,
     
    When you post a prepayment invoice from a Sales Order, Business Central creates a Posted Sales Invoice that includes fields referencing the originating Sales Order.
    Key fields on the Posted Sales Invoice Header that maintain this link include:
    Order No. (the original Sales Order number)
    Prepayment Invoice (Boolean)
    Prepayment Order No. (if applicable)
    Similarly, when you post the final Sales Invoice, the Order No. field also retains the original Sales Order reference, ensuring both invoices trace back to the same order.
     
    Custom Fields for Negative Lines
    For your second question (custom fields like Line Type or Reference Invoice Number):
    You can extend table 112 “Sales Invoice Line”.
    Use the event OnAfterInsertPrepaymentLine in codeunit 442 (Sales-Post Prepayments) to populate these fields only when Quantity < 0.
    This allows Business Central to automatically assign your custom data when generating the negative prepayment reversal line during posting.

    Regards,
    Oussama Sabbouh
  • Suggested answer
    Rishabh Kanaskar Profile Picture
    5,126 on at
    Working on Prepayment Sales Invoice
    Hi,
     
    1. In posted sales invoices, there's no direct field linking the prepayment invoice and the Final invoice. To establish a relation, you can use the "Prepayment Invoice No." field in the sales order or track via "Document No." and "Order No." in the related ledger entries.
     
    2. Since the line doesn’t exist before posting, you must inject values during posting logic using extension.
     
    Thanks
    Rishabh

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
Sumit Singh Profile Picture

Sumit Singh 2,085

#2
YUN ZHU Profile Picture

YUN ZHU 1,810 Super User 2025 Season 2

#3
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 1,788

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans