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
"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.
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- 🕐 Remember When Lists Could Sort By Any Key? 🔄 — possibly related: both name Page 22 “Customer List”
- All new goodies about AL Namespace in BC 2025 wave 2 — possibly related: both name Page 22 “Customer List”
- Arrange Fields in Rows and Columns Using a Fixed Control — possibly related: names Page 151 “Customer Statistics”
- Business Central v29: System Audit Fields Now Available in Analysis Mode — possibly related: both name Page 22 “Customer List”
- Dynamics 365 Business Central: Convert Word (.docx) To PDF (.pdf) within BC (No control add-in and APIs) — possibly related: both name Page 22 “Customer List”
- Dynamics 365 Business Central: How to get current Profile (Role) info (Profile ID, Display Name, Source, Role Center ID, etc.) via AL — possibly related: both name Page 22 “Customer List”
- Dynamics 365 Business Central: How to hide/disable New, Edit (Edit List), and Delete actions on the page — possibly related: both name Page 22 “Customer List”
- Dynamics 365 Business Central: How to quickly get User Experience/Experience Tier (Essential or Premium) in AL — possibly related: both name Page 22 “Customer List”
- Dynamics 365 Business Central: How to substitute a page for another page via AL — possibly related: both name Page 22 “Customer List”
- Dynamics 365 Business Central: How to use Page.SetSelectionFilter Method in temporary records — possibly related: both name Page 22 “Customer List”
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.