MADHDA Business Solutions
  • Home
  • About Us
    • Privacy Policy
  • Services
    • Implementations
    • Support
    • Training
    • Upgrade
    • Business Analysis
  • Solutions
    • MS Dynamics 365 Business Central
    • MS Dynamics Nav
    • MS Dynamics 365 Sales/CRM
    • Power BI
    • Power Automation
  • Resources
    • Blog
  • Contact Us
  • SetLoadFields in Business Central

SetLoadFields in Business Central

12 November 2020

SetLoadFields in Business Central

Hello Philomaths,

With the release of Business Central Wave 2 2020 the partial records capability is available.

SetLoadFields is an amazing feature of business central wave 2 2020.advantage of SetLoadFields is to make execution of code faster and give more performance.

following methods available in business central To accommodate partial records.

METHOD DESCRIPTION
SetLoadFields Specifies a set of fields to be initially loaded when the record is retrieved from its data source.
AddLoadFields Adds fields to the current set of fields to be initially loaded when the record is retrieved from its data source.
AreFieldsLoaded Checks whether the specified fields are all initially loaded.
LoadFields Accesses the table’s corresponding data source to load the specified fields.

We are used to loads fields together when necessary to retrieve record from table, I think it will select record from table. It will take little bit more time . SetLoadFields fuction reduce this time and I think it retrieve field from table . so, performance improve.

Let’s see with example, we want to calculate sum of Unit Price of filtered items and message total amount.

If you see SetLoadFields is call before data fetching operation starts. This will determine which fields needed for Find Set Call.

Publish it and Open Business central -Item List page

Try this code with SetLoadFields() and Without SetLoadFields.

I recommend to Use this feature while fetching data from table . Not for Insert (), Modify () and Delete() Operation.

There are also some other functions  available to partial records(AddLoadFields, LoadFields,AreFieldsLoaded) But I think SetLoadFields is Important One.

Thanks for reading.

Previous post: Substituting a Report in Business Central
Next post: How to setup Jet Reports add-in in Business Central

Categories

  • Microsoft Dynamics 365
  • Microsoft Dynamics Business central
  • Microsoft Dynamics NAV
  • Uncategorized

Recent Post

  • Business Central : Retrieving Azure AD User information via AL.
    March 20, 2023
  • Change Authentication method from Basic Auth to OAuth2 while accessing Business Central Webservice / APIs.
    February 27, 2023
  • How to use "Dictionary" Object type into Business Central.
    February 17, 2023
  • Post Transaction Using Configuration Package in Business Central.
    February 13, 2023
  • How to Import Image from Excel to BC using Azure function.
    February 6, 2023
 


    © Copyright 2020 | All Rights Reserved By MADHDA