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

Announcements

No record found.

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 fields using action button?

(0) ShareShare
ReportReport
Posted on by 160

8308.Capture.PNG

I want to update Payment,balance,Net change fields by using Action Button on page.

I used below mentioned code. but its updating Name, adress and "No." Fields only.

trigger OnAction();
                var
                    customer: Record Customer;
                    cust: Record CustTable;
                begin
                    cust.Reset();
                    DeleteAll();
                    Customer.findset;

                    repeat

                        Cust."No." := customer."No.";
                        cust.Name := customer.Name;
                        cust.Address := customer.Address;
                        cust.Balance := customer.Balance;
                        cust.NetChange := customer."Net Change";
                        cust.Payments := customer.Payments;
                        cust."Balance Due" := customer."Balance Due";
                        cust.insert;

                    until customer.next = 0;

                end;

Capture.PNG_2D00_640x480.png

  • Suggested answer
    IB-29041624-0 Profile Picture
    1,191 Moderator on at

    Some of the fields you are using here are flowfields so you need to do a calcfields(Balance,"Net Change",Paymentys,"Balance Due");

    Before you can use the values of those fields.

    Put the calcflields command on the top of your repeat loop. f.ex.

    But why are you using a spesific CustTable and not the customer record directly in your form?

  • happysingh0009 Profile Picture
    160 on at

    After trying your solution, i get this message

    "A flow field is part of the query column list, this is not supported"

  • Suggested answer
    IB-29041624-0 Profile Picture
    1,191 Moderator on at

    A bit hard to overlook with only seeing part of your AL code.

    Are any of the fields i the CustTable defined as flowfields?

    If so you need to make them ordinary fields if you want to use your approach.

    You probably get the error because your are trying to assign a value to a flowfield.

    But i still think you should create your page with the Customer table as your source table instead of your CustTable as the source table.

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

#2
YUN ZHU Profile Picture

YUN ZHU 362 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 359 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans