Session Event table recorded user login and logout date and time, by default standard Business Central did not present this information to end user. In this blog, we show how to customize a Page to present this information to end user.
We customization a new list page with:
- Set SourceTable properties to Session Event table
- Set Editable properties to False
- Make this page able to search by “Tell Me” feature
- Filter some client type which did not belong to user login.
Limitation: Session Event Table is a share table, and did not contain Company Name information. So you will get same information no matter which company you logged in.
List Page
page 57081 "Session Events"
{
Caption = 'Session Events';
PageType = List;
UsageCategory = Lists;
ApplicationArea = All;
SourceTable = "Session Event";
Editable = false;
layout
{
area(Content)
{
repeater(Group)
{
field("User ID"; "User ID")
{
ApplicationArea = All;
}
field("Event Datetime"; "Event Datetime")
{
ApplicationArea = All;
}
field("Event Type"; "Event Type")
{
ApplicationArea = All;
}
field("Client Type"; "Client Type")
{
ApplicationArea = All;
}
field("Database Name"; "Database Name")
{
ApplicationArea = All;
}
field("Client Computer Name"; "Client Computer Name")
{
ApplicationArea = All;
}
}
}
}
trigger OnOpenPage()
begin
FilterGroup(2);
SetFilter("Client Type", '%1|%2|%3|%4|%5|%6|%7',
"Client Type"::Desktop,
"Client Type"::Phone,
"Client Type"::"SharePoint Client",
"Client Type"::Tablet,
"Client Type"::"Web Client",
"Client Type"::"Web Service",
"Client Type"::"Windows Client"
);
FilterGroup(0);
end;
}
Result in Tell Me feature searching function
Details show in list page
You can find more details about Session Event Table in Microsoft Docs web sites (refer to older version Nav)
https://docs.microsoft.com/en-us/previous-versions/dynamicsnav-2015/hh894675(v=nav.80)
For Business Central On-Premises you can found configuration about the data stay in Session Event Table in Microsoft Docs web sites below, and search key word "Session Event"
*This post is locked for comments