Hi everyone, i tried to google question but maybe i dont know how to formulate it correctly so need some living human beings help
I want to know how many records list page loads after it opens, i thought it works similar to SETRANGE loading some predefined amount of records in one query... But i was not sure so tried to count records in OnAfterGetRecord by adding +1, and the result was 44, i tried to understand mechanics, changed resolution and resized page then opened it in smaller size but there was always 44 records. Of course if i would go through the list there would be more records counted.
So now iam curious about it
And question rise from discussion of performance penalty of adding FlowField "Description" from Jobs table (having 5K-10K records) to custom page based on Time Sheet Lines (filtered to ~100 records usually) table witch contains Job No. In my opinion penalty would be hardly noticed in any circumstances while using PKey an no heavy calculations. But my opponent had point about MSFT getting rid of FlowFields in Standard and using FactBoxes. In some situations i do not see FactBoxes that usefull though.
So do i count records right? We are on 2017 in Azure cloud, dont know about CU.
Thanks in advance!
BR
Answers
This does not match the the count of firing the OnAfterGetRecord trigger, as NAV does not fire one SQL query per one OnAfterGetRecord call. It reads a batch of records into internal buffers/cache and then OnAfterGetRecord fetches the data from the cache one by one.
Lookup flowfields are quite light in terms of querying the server, you would not feel the difference.
What is better, in tems of performance, is more philosophical rather than practical discussion in this case imho. On one hand calculating lookup flowfield NAV will use query retieving just that required column, rather than retrieving all the columns as it happens when you use FIND, GET or anyting like this, on the other hand Factbox will retrieve only one full record.
If it was me, If I were to modify a standard NAV table then I'd prefer to modify custom FactBox page instead - unless users need, for example, export the timesheet into an Excel spreadsheet, or filter or search for specific Job Description.
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03