Assigning a Variable to the UserName in SalesLogix

Question: How do I assign a variable to the UserName code in SalesLogix?  Something like this:

Dim tUserName = select username from userinfo where userid = ‘TheUserID’ ?

Answer: To do this you need to create an ADO recordset and open that query. Then get the value from the ADO recordset.

Dim rs

Dim sUserName

Set rs = Application.GetNewConnection.

Execute(“select username from userinfo where userid = ‘” & useridvariable & “‘”)
sUserName = rs.Fields(“username”).Value

Set rs = Nothing
MsgBox “User name for ” & useridvariable & ” is ” & sUserName



Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!

You have Successfully Subscribed!