Showing Database name of current AOS in AX 4.0x title bar
Good morning,
In prior versions of Ax (such as 2.5) you could see the currently running Database name in the title bar of your client. To have this in Dynamics Ax 4.0x, add this code to method 'workspaceWindowCreated' in class 'Info'.
void workspaceWindowCreated(int _hWnd)
{
SqlSystem sqlSystem = new SqlSystem();
;
{
SqlSystem sqlSystem = new SqlSystem();
;
if (sqlSystem.createLoginProperty())
{
winApi::setWindowText(_hWnd,
{
winApi::setWindowText(_hWnd,
strfmt("%1, Configuration: %2",
winApi::getWindowText(_hWnd), sqlSystem.loginDatabase()));
}
}
}
}