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...
Suggested Answer

Auto Popup of list of Items in page 47 "Sales Invoice Subform"

(0) ShareShare
ReportReport
Posted on by 891

How is the auto-popup of the list of Items in page 47 "Sales Invoice Subform" ("No." field) achieved? There is an OnValidate trigger (see below) that calls various procedures, none of which, as far as I can see, handle a KeyPress event (as known in .NET) that would load the Items page and filter as the user types the Item-Code. which is what happens.

field("No."; "No.")
{
ApplicationArea = Basic, Suite;
ShowMandatory = Type <> Type::" ";
ToolTip = 'Specifies the number of a general ledger account, item, resource, additional cost, or fixed asset, depending on the contents of the Type field.';

trigger OnValidate()
begin
NoOnAfterValidate();
UpdateEditableOnRow();
ShowShortcutDimCode(ShortcutDimCode);
UpdateTypeText();
DeltaUpdateTotals();
end;
}

I've tried a snapshot debug session and an event recorder session, but I'm still none the wiser. I've used an OnLookup trigger but the user has to click the ellipsis button to display the list of Items. How does it happen automatically?

Any help would be gratefully appreciated.

I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    95,548 Super User 2025 Season 2 on at

    Hi, This is simply using the TableRelation Property in the table.

    More details:

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-tablerelation-property

    For example: table 37 "Sales Line"

    pastedimage1647391719471v1.png

    Hope this will help.

    Thanks.

    ZHU

  • Nick Webb Profile Picture
    891 on at

    Thanks for your helpful response. So, the story is, in my table & page where I was trying to replicate the behaviour of the Sales Invoice card page, I had included an OnLookup trigger to display the Item List. All I did was to comment out this trigger and all works as it should. The trigger was cancelling out the system behaviour. A classic case of too much code. Oh well, live and learn.

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,151

#2
Jainam M. Kothari Profile Picture

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

#3
YUN ZHU Profile Picture

YUN ZHU 1,092 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans