A page like Ledger Entries taking more than a minute to load usually points to performance issues in the underlying data retrieval rather than just the UI customizations. Adding fields from related tables can impact performance, especially if they are flow fields or require complex lookups for each record.
Here are the common reasons and solutions:
> Flow Fields and Joins: If you have added fields from Sales Invoice Header or Purchase Invoice Header tables, they may be calculated fields. Each record shown on the page triggers a lookup, slowing down the page load.
• Solution: Consider using an extension to precompute these values and store them in a custom field on the Ledger Entry table to avoid runtime lookups.
> Large Dataset: Ledger Entry tables can have thousands of records, and loading them with joins can be heavy.
• Solution: Apply filters, limit the number of records shown initially, or use search/filtering to drill into smaller subsets.
> Environment Performance: Check if this happens for all users and across environments. If yes, it might be an environment performance issue.
• Solution: Raise a support ticket with Microsoft and provide a performance recording using Page Inspector or Performance Profiler in Business Central so they can analyze it.
> Extensions and Events: If there are custom extensions subscribing to OnAfterGetRecord or similar triggers, they may be adding overhead.
• Solution: Review extensions and optimize event subscriber code.
Thanks
Rishabh