Hello everybody!
First of all I'm new to ilogic - OK not completely new - I tried some snippets and if you want to make common things you have a easy solution.
Now i want to convert my VBA auto-macro to ilogic/VB.net code to create a rule. In the VBA-Code I made a query to LDAP to pull aut the department the current logged in user belongs to.
How do I achive this with ilogic?
here is my VBA-code which works:
Private Function CheckUser() As String On Error Resume Next Dim qQuery, objSysInfo, objuser Dim Department Set objSysInfo = CreateObject("ADSystemInfo") objSysInfo.RefreshSchemaCache qQuery = "LDAP://" & objSysInfo.UserName Set objuser = GetObject(qQuery) Department = objuser.Department Select Case Department Case {Case1}
CheckUser = TitleBlockLAG Case {Case2}
CheckUser = TitleBlockLT Case Else CheckUser = TitleBlockLAG End Select End Function
Thank you in advance!
Greetings,
Hel
Hello,
thank you for your reply - unfortunately I'm new to VB.NET and ilogic and the Problem is that we need this piece of Code in a short time because we're going to update to INV2014 next week. In this short time an due to the fact that much other work is on my desk I can't learn VB.NET as fast as i should. 😞
I searched round and found some snippets concerning LDAP but with ilogic they all produced many errors...
I hope someone can help me to modify the code to get it to work with ilogic.
Many thanks,
hel