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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

How to Update flowField Automatically when the other field

(0) ShareShare
ReportReport
Posted on by 90

I have flowField in the header which is the sum of the amount in lines but it does not update automatically, it updates  when I refresh the page .

How can I make it update automatically.

I tried doing this 

Header.get(rec."Document Type", rec."Document No.");
HeaderPage.SetRecord(Header);
HeaderPage.SetTableView(Header);
HeaderPage.Close();
HeaderPage.Run();
on validate 
is there any way to make sure that  flowfield is updating automatically without reopening the page ?
and page.close is not working does anyone have any idea about that?
I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    Hi,

    In earlier version of NAV we have a command which can be Stroke a Refresh button key (F5), using 'Windows Script Host Object Model'.WshShell .Net library

    CREATE(WshShell);

    WshShell.SendKeys('%{v}');

    CLEAR(WshShell);

    but I in SaaS version, as I know this is not available unfortunately. You can either write a code on OnafterGerRecord trigger of header Page or  press F5 manually.

  • Greg Partlow Profile Picture
    5 on at

    set your page property to refreshonactivate = true;

  • Suggested answer
    YUN ZHU Profile Picture
    102,932 Super User 2026 Season 2 on at

    Hi, did you find no change in this Flowfield value after modifying any field?

    I feel that using Page.Update([Boolean]) Method  can solve this problem.

    More details:

    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/page/page-update-method

    Or, using Record.CalcFields(Any [, Any,...]) Method directly.

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

    Hope this helps as well.

    Thanks.

    ZHU

  • muaz deyab Profile Picture
    90 on at

    I tried Page.update and record.calcFields() but non of them works

  • muaz deyab Profile Picture
    90 on at

    I want the field in the header to update when I change the Amount in the lines

  • muaz deyab Profile Picture
    90 on at

    I already set it to true

  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    Hi,

    Show your complete code here

  • muaz deyab Profile Picture
    90 on at

    field(Quantity; Rec.Quantity)

                   {

                       ApplicationArea = all;

                       trigger OnValidate()

                       var

                           myInt: Integer;

                           HeaderPage: page "Header Page";

                           Header: Record "Sales Header";

                       begin

                           if rec."No." = '' then

                               Error('Please Enter an Item');

                           Header.get(rec."Document Type", rec."Document No.");

                           HeaderPage.SetRecord(Header);

                           HeaderPage.SetTableView(Header);

                           // HeaderPage.Update();  here nothing happened

                           Header.CalcFields("HCB-Total Exc. VAT (LCY)", "HCB-Total Incl. VAT (LCY)");

                           // // HeaderPage.Editable := false;

                           // HeaderPage.Close();

                           // HeaderPage.Run();  I tried this but the page did not close

                       end;

                   }

  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    Hi,

    Move this code into Subform's OnValidate of Quantity field, and there write a line currpage.update.

    Thanks.

  • muaz deyab Profile Picture
    90 on at

    I did but it did not work

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 566 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 347 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 327 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans