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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Modify a Table Field's CalcFormula by mirroring a new field

(0) ShareShare
ReportReport
Posted on by 215

Hello,

I want to modify the CalcFormula of the "Balance Due" field in the "Customer" Table. I know I can't do it directly.

So what I want to do is to create a new field with my own ClacFormula in the Table Ext "CustomerTableExt", and pasting the content of my new field in the standard "Balance Due" field.

Like this : "Balance Due := "MyNewField";

But I'm facing a problem : "Balance Due" is a Flowfield. Its value is not stored in the database. So I don't know if any trigger, in the Table "Customer" or in any Page like "Customer Card", can change its value.

For example, I've tried in the Table Ext of "Customer" : 

        modify("Balance Due (LCY)")
        {

            trigger OnAfterValidate()
            begin
                "Balance Due" := "MyNewField";
            end;
        }

}

Or in the Page Ext of "Customer List" : 

    trigger OnOpenPage()
        "Balance Due" := "MyNewField";
    end;
And nothing seems to modify the value of Balance Due when I check it on the page Customer List.
Do you have any ideas please ?
(I'm on Business Central 16 On Premise)
I have the same question (0)
  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    Sorry but it’s a flowfield, so calculated at runtime. If you create a new field with a new CalcFormula, also this new field is calculated at runtime and you don’t need to do nothing more. The value will be automatically calculated, you don’t need to transfer values.

  • Magicrevette Profile Picture
    215 on at

    "you don't need to transfer values".

    I'm sure to understand. I don't need to because it's impossible to do so ?

    Because it is exactly what I need, since a field's CalcFormula can't be customized.

    So, if I want MyNewField's value to be assigned to the standard field "Balance Due", is it possible ? If it is, are you saying where ever I am declaring this "field mirrorring" the new value will be assigned to my standard field ?

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    You cannot transfer a value into the standard Balance Due field. This field is a FlowField, so it's not a real field but it's a query executed at runtime (Sum("Detailed Cust. Ledg. Entry".Amount WHERE...).

    You can create a new field (your new Balance Due) and hide the standard field.

  • Magicrevette Profile Picture
    215 on at

    Ok, thank you.

    I tried to create a new field instead of the standard one, but I realised a lot of procedures use the standard "Balance Due" field. And that showing a new value in pages won't change that.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,092

#2
YUN ZHU Profile Picture

YUN ZHU 663 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 515

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans