Skip to main content
Business Central forum
Suggested answer

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

editSubscribe (0) ShareShare
ReportReport
Posted on by 614

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 614 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 59,844 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

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Sundar…

Industry experts answer burning questions directly from our amazing Community…

Enabling Copilot Case and Conversation…

Agents can easily recap an ongoing chat, transcribe a voice conversation…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 282,978 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,562 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans