How can I prompt a message if the same user is trying to login in to Aras, if he's already logged in.
I tried on click on the Login button of Aras LoginPage.
Could you let us know what version of Aras Innovator you are using? If you're using 12.0, this will be more difficult as the functionality of the login page is now handled by the OAuthServer. One workaround if you're simply trying to send the user a message and not prevent the login is to simply perform a check after the login succeeds and the client loads.
The general idea of what you'd need to do is to first check if the User already has a session signed in. One example of a view that lets you see this is the License Manager dialog available through the admin user menu under Licenses > License Manager.
var res = aras.soapSend("GetUsersList", "<GetUsersList/>");
Once you get the response, you can parse it and check if the login name of the user matches one of the names with an open session. If so, you can throw up a message to let them know that they are already signed in elsewhere.
Aras Labs Software Engineer
I'm not sure this will be possible from the code of the login page itself. In order to run the query, the user first needs to sign in, so that the aras object has some credentials to communicate to the Aras Innovator server.
I'd recommend checking out my suggestion on this other forum post of using a SuccessfulLogin system event.