Lotus Script in Forms

10 pts.
Tags:
LDAP
Lotus Domino Server 8.x
Lotus Script
Names.nsf
Does anyone have a script that can be used in forms that would populate the user/submitters name, phone, title and location in the designated fields

Software/Hardware used:
Domino 8.0

Answer Wiki

Thanks. We'll let you know when a new response is added.

Not sure what you mean by “Location” but that code (for the other informations) should work. Copy and paste in the post open event of your form.

<pre>

Set ws = New NotesUIWorkSpace
Set session = New NotesSession
Set db = session.CurrentDatabase
Set uidoc = ws.CurrentDocument
Set dbPAB = session.GetDatabase( db.Server, “NAMES.NSF”, False )

if not dbPab is nothing then
set viewPab = dbPab.GetView( “($Users)” )
set docPab = viewPab.GetDocumentByKey( session.UserName, True )

if not docPab is nothing then
if not uidoc.EditMode = True
uidoc.editMode = True
end if
call uidoc.FieldSetText( “YourFieldName_NAME_Here” , docPab.FullName(0)
call uidoc.FieldSetText( “YourFieldName_PHONE_Here” , docPab.OfficePhoneNumber(0)
call uidoc.FieldSetText( “YourFieldName_TITLE_Here” , docPab.JobTitle(0)
end if
else
MessageBox “Public Adress Book can not be accessed !”, 64, “Error”
end if
</pre>
end if

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: