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

Columns in a table is non-zero, but printing them in BC make them zero

(0) ShareShare
ReportReport
Posted on by 481

In the Sales Invoice Header table, there are these Amounts for a specific customer:
21.PNG

I have this code that will collect each of those remaining amounts.
1602.PNG
Upon running it the column values for "amount" show up as 0 when Messaging/Printing to BC.
24.PNG

But when printing out the Sales Invoice No. (referring to table picture above), it messages the number just fine:
5504.PNG it grabs the correct posted invoices

Is there something wrong with my logic here?
I am working on a report extension for the Customer Statement report.

I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at

    Hi jdrco ,

    Please use below code inside the repeat..until

    salesinvHeaderRec.Calcfields(Amount);

  • Suggested answer
    YUN ZHU Profile Picture
    95,321 Super User 2025 Season 2 on at

    Hi, These fields are FlowFields, which are not really data in the table. They will be recalculated when the page is opened.

    There are two ways when you want to use its value.

    Record.CalcFields: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/record/record-calcfields-method

    Record.SetAutoCalcFields: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/record/record-setautocalcfields-method

    More about FlowFields: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-flowfields

    Hope this helps as well.

    Thanks.

    ZHU

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 3,329

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,250 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,365 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans