Hello. I posted a few months ago regarding understanding how to use the integrated login functionality. That archived thread is http://www.alphasoftware.com/alphafo...?t-115803.html
Basically, I am trying to understand how exactly to use the e.username and e.userNameFriendly functions in the server-side onLogin and client-side afterLogin sections. I am integrated into AD, and Alpha sees the logged in user name as the "user logon name" from AD. I have an employee table that contains an email address, which is always the "user logon name" @ domainname.com. It also contains fields for first and last name. For purposes that don't really matter for anyone reading this, I need to be able to take the Alpha logged in name, match it to the correct record and poll first and last name, concatenate them into one string and then populate a field in each record with that resulting string. I.E. [email protected] logs in with jdoe, and Alpha automagically writes a "John Doe" to a field in the record ready for when the user submits data.
I believe this can be done with the UX and the aforementioned tools, but there's no example code anywhere showing exactly how one uses it. I get that I would need to *maybe* make a table mapping "jdoe" to "John Doe" for that type of thing to work but ideally would like to avoid it. Currently I'm testing with stuff like
in server-side onLogin, and
in the client-side afterLogin events. Nothing pops up for an alert, I'm feeling a bit lost. So, if anyone has used this particular function and is willing to share a snippet I'd be greatly appreciative. Thanks!
Basically, I am trying to understand how exactly to use the e.username and e.userNameFriendly functions in the server-side onLogin and client-side afterLogin sections. I am integrated into AD, and Alpha sees the logged in user name as the "user logon name" from AD. I have an employee table that contains an email address, which is always the "user logon name" @ domainname.com. It also contains fields for first and last name. For purposes that don't really matter for anyone reading this, I need to be able to take the Alpha logged in name, match it to the correct record and poll first and last name, concatenate them into one string and then populate a field in each record with that resulting string. I.E. [email protected] logs in with jdoe, and Alpha automagically writes a "John Doe" to a field in the record ready for when the user submits data.
I believe this can be done with the UX and the aforementioned tools, but there's no example code anywhere showing exactly how one uses it. I get that I would need to *maybe* make a table mapping "jdoe" to "John Doe" for that type of thing to work but ideally would like to avoid it. Currently I'm testing with stuff like
Code:
e.userNameFriendly = "John Doe"
Code:
var getName = {dialog.Object}.loggedInUserNameFriendlyGet(); alert(getName);
Comment