web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

difference between SETAUTOCALCFIELD and CALCFIELD

(0) ShareShare
ReportReport
Posted on by 125

HI,

I learnt SETAUTOCALCFIELD is automatically calculate the flow field and CALCFIELD is to calculate the flow field.

what is the main difference between SETAUTOCALCFIELD and CALCFIELD?.

I have the same question (0)
  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,306 Super User 2026 Season 1 on at

    Calcfield only calculates the flowfield for current record.

    SetAutoCalcfield calculates the flowfield for all records that you retrieve. When you call SetAutoCalcfield before you retrieve the records, then when you use find and next, the flowfield values are automatically calculated. Using SetAutoCalcField is better performance than calling Calcfield in a loop.

    ------------

    Calcfield Example:

    if Rec.FindSet() then

    repeat

    Rec.CalcFields(Balance);

    //Do Something

    until Rec.Next() = 0;

    ------------

    SetAutoCalcfield Example:

    Rec.SetAutoCalcfield(Balance);

    if Rec.FindSet() then

    repeat

    //Do Something

    until Rec.Next() = 0;

  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    Hi Arepaka Sai ,

    Adding more information. I think it will help you understand more technically.

    I changed the CALCFIELDS to a SETAUTOCALCFIELDS in the OnPreDataItem. The results were impressive: the report now needed about 300 MB extra on the server side and finished in 5 minutes.

    Source : www.kauffmann.nl/.../

    Thanks.

  • Suggested answer
    YUN ZHU Profile Picture
    100,061 Super User 2026 Season 1 on at

    Hi, Just a performance difference.

    Hope the following helps.

    https://businesscentralgeek.com/7-tips-for-performance-business-central

    Thanks.

    ZHU

  • Suggested answer
    Amit Baru Profile Picture
    3,037 on at

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,825 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 967 Super User 2026 Season 1

#3
Teagen Boll Profile Picture

Teagen Boll 652 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans