---
id: post/thinkaboutit-be/7846
type: post
title: "Quick Tip: CalcFields vs SetAutoCalcFields in AL"
summary: "FlowFields in Business Central are not stored in the database and must be calculated explicitly. The post explains two methods for calculating them: CalcFields for one-time calculations on single records, and SetAutoCalcFields for automatic calculation during record retrieval, with guidance on which to use to avoid performance issues."
tier: community
language: en
tags:
  - flowfields
  - performance
  - al development
  - database
  - calcfields
  - setautocalcfields
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T01:55:24.339Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: 00bac37513f2432ffab923cfbfbacbf21d1335d89556620e6db28ad8089fa6c5
evidence:
  - kind: blog
    url: https://thinkaboutit.be/2026/04/quick-tip-calcfields-vs-setautocalcfields-in-al/
    title: "Quick Tip: CalcFields vs SetAutoCalcFields in AL"
    date: "2026-04-23"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://thinkaboutit.be/2026/04/quick-tip-calcfields-vs-setautocalcfields-in-al/
    title: "Quick Tip: CalcFields vs SetAutoCalcFields in AL"
    date: "2026-04-23"
    commit: null
    t: null
    quote: Inside a loop, calling CalcFields on every iteration means a separate database call per record.
  - kind: blog
    url: https://thinkaboutit.be/2026/04/quick-tip-calcfields-vs-setautocalcfields-in-al/
    title: "Quick Tip: CalcFields vs SetAutoCalcFields in AL"
    date: "2026-04-23"
    commit: null
    t: null
    quote: Use SetAutoCalcFields before any loop where you need a FlowField on every record.
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "7846"
source_id: thinkaboutit-be
source_name: think about IT - Steven Renders
url: https://thinkaboutit.be/2026/04/quick-tip-calcfields-vs-setautocalcfields-in-al/
published_at: "2026-04-23T12:22:33.000Z"
author: Steven Renders
full_text: false
words: 502
quotes:
  - text: Inside a loop, calling CalcFields on every iteration means a separate database call per record.
    why_it_matters: Explains the key performance problem that SetAutoCalcFields solves
  - text: Use SetAutoCalcFields before any loop where you need a FlowField on every record.
    why_it_matters: Provides the main guideline for correct usage to achieve optimal performance
code_objects_mentioned: []
systems:
  - development
  - platform
versions_mentioned:
  - BC26
  - 2025 release wave 1
  - AL runtime 15.0
preview:
  embeddable: true
  frame_url: https://thinkaboutit.be/2026/04/quick-tip-calcfields-vs-setautocalcfields-in-al/embed/
  image: https://i0.wp.com/thinkaboutit.be/wp-content/uploads/2026/04/calcfields-vs-setautocalcfields-header.png?fit=1200%2C420&ssl=1
  image_alt: null
  image_w: 1200
  image_h: 420
  site_name: think about IT
  favicon: https://i0.wp.com/thinkaboutit.be/wp-content/uploads/2026/02/cropped-SiteIcon2-1.png?fit=32%2C32&ssl=1
  probed_at: "2026-10-07T11:50:40.951Z"
---

# Quick Tip: CalcFields vs SetAutoCalcFields in AL

[Read the post](https://thinkaboutit.be/2026/04/quick-tip-calcfields-vs-setautocalcfields-in-al/) · think about IT - Steven Renders (Steven Renders) · 2026-04-23 · 502 words · tier community · reviewed (checked by Opus)

> FlowFields in Business Central are not stored in the database and must be calculated explicitly. The post explains two methods for calculating them: CalcFields for one-time calculations on single records, and SetAutoCalcFields for automatic calculation during record retrieval, with guidance on which to use to avoid performance issues.

## Key points

- CalcFields explicitly calculates FlowFields on the current record when called and is suitable for single-record calculations outside loops
- SetAutoCalcFields automatically calculates specified FlowFields for every record retrieved during FindSet or loop iterations, improving performance over repeated CalcFields calls
- Calling SetAutoCalcFields without parameters clears the auto-calculation list for the record variable
- SetAutoCalcFields is scoped to the record variable, not the table, so different variables do not inherit the setting
- As of BC26 (AL runtime 15.0), SetAutoCalcFields is available on RecordRef, enabling generic code to use the same pattern

## Quotes

- "Inside a loop, calling CalcFields on every iteration means a separate database call per record." (Explains the key performance problem that SetAutoCalcFields solves)
- "Use SetAutoCalcFields before any loop where you need a FlowField on every record." (Provides the main guideline for correct usage to achieve optimal performance)

## Context

- Features: CalcFields method, SetAutoCalcFields method, FlowField calculation, RecordRef support
- Versions: BC26, 2025 release wave 1, AL runtime 15.0

Source: think about IT - Steven Renders, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
