Creating page views
In Dynamics 365 Business Central you can create customized views for your list pages. These customized views can be used in a dedicated section of the Dynamics 365 Business Central user interface to immediately apply filters to the list.You can create a view definition in a page object by using the tview
snippet. In the previously created Gift Campaign List
page, we have defined the following view
objects:
views
{
view(ActiveCampaigns)
{
Caption = 'Active Gift Campaigns';
Filters = where(Inactive = const(false));
}
view(InactiveCampaigns)
{
Caption = 'Inactive Gift Campaigns';
Filters = where(Inactive = const(true));
}
}
The first view (called ActiveCampaigns
) shows all of the active gift campaigns (the Inactive
field is set to false
), while the second view (called InactiveCampaigns
) shows all of the inactive gift campaigns (the Inactive
field...