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

Possible bug when using Sales Line in CalcFormula, it skips the OnAssistTrigger

(1) ShareShare
ReportReport
Posted on by 9
Hey guys,
I've encountered a problem when I base a CalcFormula on Sales Lines, where it no longer triggers OnAssistEdit() on Page fields that referer to this value.
The value shown on the field of the Page is correct, but when I click it to open an Assisted Edit Page it skips the trigger OnAssistEdit(), and instead just opens the standard List Page Sales Lines (516, List)
 
Can anyone help me confirm that this is an actual issue?
 
Here's some sample code:
 
tableextension 50305 SalesLineExtension extends /Sales Line/
{
    fields
    {
        field(5030590; Fees; Decimal)
        {
            CalcFormula = Sum(/Sales Line/./Unit Price/ where(/Document No./ = field(/Document No./), /Line No./ = field(/Line No./), /Sell-to Customer No./ = field(/Sell-to Customer No./)));
            Caption = 'Fees';
            FieldClass = FlowField;
            Editable = false;
        }
    }
}
pageextension 50405 SalesInvoiceSubformExtension extends /Sales Invoice Subform/
{
    layout
    {
        addafter(/No./)
        {
            field(Fees; Rec.Fees)
            {
                Caption = 'Fees';
                Editable = false;
                ApplicationArea = All;
                Width = 7;
                trigger OnAssistEdit()
                begin
                    Message('OnAssistEdit hit!');
                end;
            }
        }
    }
}
 
  • Verified answer
    YUN ZHU Profile Picture
    104,090 Super User 2026 Season 2 on at
    If you are referring to the trigger of clicking the flowfield, this is not the OnAssistEdit trigger, but the Ondrilldown trigger.
    However, please note that this will prevent the flowfield page from opening.
     
    Hope this helps
    Thanks.
    ZHU
  • CU27040853-3 Profile Picture
    9 on at
    You are absolutely right ZHU, I was mistakenly using the wrong trigger.

    Thank you so much, and thank you for all your BC guides. I use them alot, and they are a godsend!
     
    Regards,
    Henrik

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

#2
YUN ZHU Profile Picture

YUN ZHU 430 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 280 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans