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 :
Finance | Project Operations, Human Resources, ...
Unanswered

How to detect Credit Note / Debit Note for posted Sales invoice (D365FO)?

(1) ShareShare
ReportReport
Posted on by 39

Context


  • Printing is triggered after posting from SalesInvoiceJournalPrint.printJournal(Set _journalList) (extension).

  • I can print my custom report successfully after posting.

  • I also added a manual print button on CustInvoiceJournal (multi-select) and it works.

Problem


  • In Thai localization, I found CustInvoiceTableExtensionTH.NoteFormat (enum TaxUnrealizedSalesNoteFormat) which can indicate CN/DN.

  • However, for many posted invoices created from Sales order “Credit invoicing”, CustInvoiceTableExtensionTH.NoteFormat is empty/None, but the standard output still prints with “Credit Note” title.

  • Therefore, NoteFormat is not populated in all flows, and Number sequence is not reliable.

Questions


  1. In standard D365FO, what is the correct source of truth to decide “Invoice vs Credit Note vs Debit Note” for sales invoices?

  2. Which table/field does standard logic use (e.g., CustInvoiceJour.InvoiceAmount sign, CustInvoiceTrans quantities, correction/reversal flags, references to original invoice, etc.)?

  3. For Thai DN/CN documents: is there a standard field (or doc type) that is always set for DN (not just “amount > 0”)?

  4. Is there a recommended API / method to reuse (e.g., a standard method that returns the document title/type, similar to SalesInvoiceContract.parmDocumentTitle() or something in SalesFormLetter_Invoice / SalesInvoiceJournalPrint)?

  5. If NoteFormat is only used by some TH scenarios, when is it supposed to be populated, and by which class/table update?

  6. Best practice for custom report header: should we implement a fallback like “if NoteFormat empty -> use amount sign for CN, otherwise use NoteFormat for DN/CN”, or is there a better approach?
     

Any pointers to the exact class/method names or a pattern you have used would be greatly appreciated.

Categories:
I have the same question (2)

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 778 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 625 Super User 2025 Season 2

#3
CU05031448-0 Profile Picture

CU05031448-0 468

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans