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

Timesheet Total Quantity values

(0) ShareShare
ReportReport
Posted on by 22

So I have been tasked with creating all the time sheets for business central; I've been adding in little features such as vacation balance, sick balance, TIL etc.
I implemented a fact box on the timesheet itself, but when entering values into a timesheet, my Rec."Total Quantity" remains at 0 in my code behind as I debug through the code. If I open the page inspector and look at my field values, it displays the correct value for the calculation for each line. I have no idea why I can't see this value in my code behind, and I would appreciate any help.
Has anyone else had this problem before? I'm very confused as to why It wont let me use the values of Total Quantity.

7652.pastedimage1681422794750v2.png

4382.pastedimage1681422894548v3.png

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    300,731 Super User 2025 Season 2 on at

    Moved the question from the Dynamics 365 Finance to the Dynamics 365 Business Central forum.

  • Verified answer
    YUN ZHU Profile Picture
    95,307 Super User 2025 Season 2 on at

    Hi, This is a Flowfield, not a real value in the table, it will be calculated automatically when the page is opened.

    If you want to read this value in the code, you need to execute the following two methods first.

    Record.CalcFields(Any [, Any,...]) Method
    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/record/record-calcfields-method

    Record.SetAutoCalcFields([Any,...]) Method
    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/record/record-setautocalcfields-method

    pastedimage1681428881491v1.png

    More details: https://yzhums.com/5802/

    Hope this helps.

    Thanks.

    ZHU

  • bcaron1000 Profile Picture
    22 on at

    ZHU!

    Thank you so much! Im a huge fan by the way, Ive been following your content since I started working within business central development!

    I did manage to get it to work. now Im wondering if i can programatically change the process button to be greyed out if a value reaches a negative value. I will research a bit more before i ask for any further instruction on that though.

    Thank you for your help!

    Bryan

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,377

#2
Jainam M. Kothari Profile Picture

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

#3
YUN ZHU Profile Picture

YUN ZHU 1,512 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans