Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

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

Posted on by 659

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.

Categories:
  • Nick Webb Profile Picture
    Nick Webb 659 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
    YUN ZHU 69,639 Super User 2024 Season 2 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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,524 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans