BC Friday Tips #10 Use SetLoadFields to partially load data from a table

SetLoadFields

Happy Friday! Time for our weekly BCFridayTips for the msdyn365bc developers!

Use SetLoadFields to partially load data from a table.

Why?

✅ Improve Performance. Fetching only the necessary fields can significantly improve performance, particularly when dealing with table extensions.

However, remember that its usage should be limited to read transactions. Using it for write transactions would be counter-productive because the write transaction requires the record to be fully loaded.

It’s also recommended not to use it when executing multiple queries on the same table with varying field sets, like Setup Tables. In such cases, loading all fields and utilising cached data for subsequent queries is more efficient.

thatnavguy

Experienced NZ-based NAV Developer and Consultant with 15+ years of experience leading multiple IT projects, performing business analyst, developing, implementing, and upgrading Dynamics NAV and Business Central. Passionate to deliver solution that focuses on user-friendly interface while keeping high standard of compliance with the needs.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *