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

Notifications

Announcements

No record found.

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
    95,595 Super User 2025 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
  • 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,010

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,270 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,085 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans