Hallo Zusammen!
Ich hab nun fast schon alles erledigt für diese Anforderung. Allerdings hab ich noch ein kleines Problem.
Es wird ein Agent gestartet, der die Dokumente im NAB ändert. Dieser Agent nimmt aber nicht alle Dokumente in der DB wie ich es eingegeben habe, sondern nur das letzte.
Was kann das sein?
Ich hab noch den Quelldings vom Agentent:
(Nicht alles selbstgeschrieben, nur angepasst)
Sub Initialize
Set session = New Notessession
' Gets the current document
Set curdoc = session.DocumentContext
' Gets the primary address book
Set dbNames = session.GetDatabase("hbdo01/heizboesch","names.nsf")
' Gets the hidden view of person documents
Set viewNames = dbNames.GetView("($VIMPeople)")
' Gets the person document for the user
Set docNames = viewNames.GetDocumentByKey(curdoc.GetItemValue("UserName")(0), True)
Print "DocNames ausgeführt"
' Give error if user is not located in address book
' This can happen if user has not logged in the server or if username is in some secondary address book
If docNames Is Nothing Then
Print "[/" & curdoc.GetItemValue("DbPath")(0) & "/message?OpenForm&1]"
Exit Sub
End If
' Gets the current password entered by user
'currentPassword = curdoc.GetItemValue("CurrentPassword")(0)
' Gets the new password entered by user
newPassword = curdoc.GetItemValue("NewPassword")(0)
' Gets the encoded password stored in user's person document
'passwordInAddressBook = docNames.HTTPPassword(0)
' Gets the encoded form of the current password
'temp = Evaluate({@Password(CurrentPassword)}, curdoc)
'encodedCurrentPassword = temp(0)
' Checks current password entered by user against the password stored in his person document
'If ( encodedCurrentPassword <> passwordInAddressBook ) Then
'Print "[/" & curdoc.GetItemValue("DbPath")(0) & "/message?OpenForm&2]"
'Exit Sub
'End If
' Gets the encoded form of the new password
temp = Evaluate({@Password(NewPassword)}, curdoc)
encodedNewPassword = temp(0)
' Updates the person document
docNames.HTTPPassword = encodedNewPassword
' Löscht die Forwardingadress aus dem Personendokument
docNames.MailAddress = ""
Call docNames.Save(True, False)
Print "[/" & curdoc.GetItemValue("DbPath")(0) & "/message?OpenForm&3] - Passwort geändert"
' End
End Sub
Danke