community postSales & Receivablescommunity - not Microsoftreviewed - checked by Opus

Dynamics 365 Business Central: How to quickly identify the first transaction date and the number of days since the last sale with a customer

The Customer Statistics page (Customer > Statistics, then Show more) shows a customer's first transaction date and the days since the last sale without any code. First Transaction Date is a standard field on table 18 Customer, while Days Since Last Sale is only a variable on page 151, so the post gives a page extension that adds both to the Customer List.

post Dynamics 365 Lab

Yun Zhu · 2026-07-17 · 369 words · about 2 min

"You don't need complex customizations to gain deeper customer insights."

Key points

  • Open Customer > Statistics from the Customer List or Card and choose Show more; Customer Since and Lifetime (since) show the first transaction date
  • The Days Since Last Sale value on the statistics page counts days since the customer’s last purchase
  • First Transaction Date is a standard field on the Customer table; DaysSinceLastSale is a page variable, not a table field
  • A sample page extension adds both to the Customer List, computing days as work date minus the posting date of the latest non-reversed customer ledger entry with positive sales, with drill-down to that entry

Quotes

  • “You don’t need complex customizations to gain deeper customer insights.” (Establishes that standard Business Central functionality meets customer analysis needs without development effort)
  • “The First Transaction Date field is a standard field in table 18 Customer.” (Confirms the field exists natively, enabling reuse across pages without custom coding)

AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

No source states these links: they share an object, a model read them, or a person found the same subject.

Context

  • Features: Customer Statistics, First Transaction Date, Days Since Last Sale, page extension

Source: Dynamics 365 Lab - Yun Zhu, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.