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?.

  • 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
    103,103 Super User 2026 Season 2 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,043 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 748 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 354 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 351 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans