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;
            }
        }
    }
}
 
I have the same question (0)
  • Verified answer
    YUN ZHU Profile Picture
    98,421 Super User 2026 Season 1 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
  • Community member 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,850 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,045 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans