Some Axapta system administrator may feel it is really annoying that Axapta allows the user to create multiple Axapta sessions and log in as the same user. If you want to give the user notification prior to logging in as the same User ID, here comes the solution.
Under the Info class, modified the startupPost method like the codes below:
void startupPost()
{
int counter;
int num = 0;
int maxSessions = Info::licensedUsersTotal();
xSession session;
UserInfo userInfo;
UserId currentUserId;
;
currentUserId = curuserid();
for(counter = 1; counter < session =" new" id ="="" currentuserid ="=""> 1)
{
if(box::yesno("The same user id can't log in twice. Do you want to log in anyway? ",
DialogButton::Yes, "Log in", "Log out") == DialogButton::No)
{
infolog.shutDown(true);
}
}
}
Please notice that, if you modify the startupPost method of Application class, that works only in 2-tier environment. For both 2-tier and 3-tier environment, it is recommended to modify the startupPost method of Info class.
Subscribe to:
Post Comments (Atom)
How to identify the user that was used to change an object from AOT in AX2012
Get the object name for which we need to track these (user and date&time) information's. Login to SQL Server Management Studio an...
-
Combo boxes in Dialogs are added by adding a DialogField object with the type of an enum. The enum is then controlling what items you can pi...
-
This article explains: How to picking list through a job using X++ in Dynamics AX. Applied on: Dynamics AX 2009 SP1 Create a job a...
-
A while ago I had the need to translate labels, I was creating eMail bodys while using SysMailer and wanted to use different languages for d...
No comments:
Post a Comment