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 640

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 640 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 64,563 Super User 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

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,584 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,864 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans