Nov 22, 2024
2 min read

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

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

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 using it for write transactions could be counter-productive because logic on triggers and event subscribers can cause 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.

Related Posts