/ Forums / Advansys Formativ / Creating Solutions with Formativ / Current User Details / Reply To: Current User Details
February 6, 2005 at 2:41 pm
#7120
Yes, this is possible using Novell NDS ActiveX controls. You can download these from Novell.
Here is a very simple example:
'------------------------------------------------------------------------------- ' Read Novell eDirectory Example ' Designed by: Formativ Business Solution Team ' Copyright (c) 2002 Advansys Corporation (www.advansyscorp.com) ' Version 1.0 ' ' Description: ' This is an example of reading user phone numbers out of eDirectory using ' Formativ. Before running the example, you must: ' ' 1) Download and install the Novell Controls for ActiveX from ' www.developer.novell.com/ndk/ocx.htm ' ' 2) Edit line "oSession.Fullname =" below, inserting the full path of the tree ' and context you wish to browse. ' ' 3) Be authenticated to eDirectory ' ' This is a very simple example with no error checking, etc. It can be easily ' extended to use any of the features found in the Novell ActiveX controls, ' including updating field values, etc. ' ' INTEGRATIONS: There are no integrations defined apart from appearing on the ' Formativ Applet Run Menu. '------------------------------------------------------------------------------- Sub Main(Client, GWEvent) Dim oSession Dim ServerNames Dim Entries Dim Entry ' Create an instance of the NWDir COM object Set oSession = CreateObject("NWDirLib.NWDirCtrl.1") ' Specify the name of the tree "<tree name>" and context "<ou>" you wish to browse ' for example, oSession.FullName = "NDS:\<tree name><ou>...<ou> etc." oSession.FullName = "NDS:\<tree name><ou>" ' Display each user and their phone number Set Entries = oSession.Entries for each Entry in Entries if Entry.Layout.Name = "User" then PhoneField = Entry.GetFieldValue("Telephone Number", "", True) Call MsgBox("User: "& Entry.ShortName & " Phone Number: " & PhoneField(0),,"Formativ") end if next Set oSession = nothing End Sub
I hope this helps.
Advansys Support