Please wait
Talk to Expert
Microsoft Dynamics Business central, Visual Studio Code

Lookup a Page for a field via Table and Temporary Table.

Configure Business Central Container in Docker. 01 (1)

The “Lookup a Page” functionality allows users to easily select values for a field by searching and choosing from a list of records displayed in a lookup window. This feature is commonly used when a field needs to reference records from a related table or temporary table.

In some cases, we cannot filter Table’s data accurately which we want based on conditions/filters. In such instances, it becomes necessary to preprocess the data before displaying it on a page.

Firstly, let’s discuss the process of opening a page with Normal Table Data in Microsoft Dynamics 365 Business Central using Page Trigger “Lookup”.

As per below example, we can use Page Trigger Lookup to show data of a table using SetTableView.

In second scenario, we will have a look on how we can show Temporary Table Data on Page.

In below example, I have added vendors in Temporary table which are available in Posted Purchase Invoice table. We cannot show Temporary Table Data on Page as we used above as SetTableView cannot be used for Temporary Tables. So, in this scenario we need to open page using “Page.RunModal(Page::”Vendor List”, Vendor_Temp) = Action::LookupOK” and need to assign/validate value directly in the field, in order to use the Temporary Table’s Data.


Comments