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...
Answered

OnValidate Trigger issues

(0) ShareShare
ReportReport
Posted on by 85

Hello Experts,

I am experiencing an issue where I have seemingly two identical fields and I am using the onvalidate trigger on the page to modify these fields (to recalculate the values). When I modify the subtotal Cost on my page and tab out the subtotal cost changes immediately.

field(50109; "Subtotal Cost Excl Tax"; Decimal)
        {
            FieldClass = FlowField;
            CalcFormula = sum("Sales Line".SubtotalCostExclTaxLine where("Document No." = field("Document No.")));
        }
        field(50117; "Subtotal Line Amount"; Decimal)
        {
            FieldClass = FlowField;
            CalcFormula = sum("Sales Line".LineAmount2 where("Document No." = field("Document No.")));
        }

When I am modifying the Subtotal Line Amount the value does not change right away and only seems to change after I click around on the page, or enter another value into a different field. Is this a common issue? Is there something I am missing in the setup?

both of the triggers on page look like this

 trigger OnValidate()
                begin
Rec.Calcfields(Subtotal field here); 
end;

  • Suggested answer
    Akshay_Panchal Profile Picture
    402 on at

    Hii,

    Is this your customized page? If yes set the page property to UpdatPropagation = both.

    Thanks

    Verify, If this answer helpful to you

  • Suggested answer
    YUN ZHU Profile Picture
    104,131 Super User 2026 Season 2 on at

    Hi, although I am not sure, can I try Page.Update([Boolean]) Method after Calcfiedls?

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

    Hope this will help.

    Thanks.

    ZHU

  • James_French Profile Picture
    85 on at

    Hello, This is on the Sales Quote page out of the box, is this property not allowed to be modified in extension?

  • Verified answer
    James_French Profile Picture
    85 on at

    Hello Yun Zhu, I will try this and let you know what happens.

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

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 633 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 419 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 236 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans