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 711

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.

  • Nick Webb Profile Picture
    711 on at
    RE: Auto Popup of list of Items in page 47 "Sales Invoice Subform"

    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.

  • Suggested answer
    YUN ZHU Profile Picture
    78,957 Super User 2025 Season 1 on at
    RE: Auto Popup of list of Items in page 47 "Sales Invoice Subform"

    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

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,001 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,833 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans