Das Notes Forum
Domino 9 und frühere Versionen => Administration & Userprobleme => Thema gestartet von: Doc Torte am 29.11.02 - 16:43:12
-
... da ist er wieder und will nen Problem haben...
ich lasse in einer HelpDesk-Datenbank die anfallenden Aufgaben in den Notes-Kalender der zur Bearbeitung verantwortlichen Personen eintragen, da der Verantwortliche durch Notes an den Termin zur Erfüllung der Aufgabe erinnert werden soll, lasse ich auch alle Felder für die Erinnerung von einem Agenten erstellen und im Kalender ablegen. Sieht alles ganz gut aus, nur Notes läßt das Erinnerungs-Popup nicht erscheinen, nur bei manuell eingetragenen Terminen scheint dieses zu funktionieren.
Welche Felder müßte ich noch zusätzlich anlegen (außer Notify/Alarm/$Alarm/$AlarmOffSet/$AlarmDescription/$AlarmUnit) ?
Hat jemand Erfahrung mit diesem Problem ?
THX
-
Hi,
ich hab mal einen Wiedervorlage-Agenten geschrieben. Dieser hat für das markierte Dokument in einer Adress-DB ein Kalenderdokument angelegt und den Alarm gesetzt. Hier ist der Code.
Sub Initialize
Dim session As New NotesSession
Dim ws As New NotesUIWorkspace
Dim collection As NotesDocumentCollection
Dim currentdb As NotesDatabase
Dim maildb As NotesDatabase
Dim profile As NotesDocument
Dim doc As NotesDocument
Dim wvdoc As NotesDocument
Dim datetime As New NotesDateTime("")
Dim dateitem As NotesItem
Dim timeitem As NotesItem
Dim MailDatenbank As Variant
Dim eintrag As String
'Initialisierung mit aktuellen Datum und Uhrzeit
Call datetime.SetNow
' Zugriff auf markiertes Dockument
Set currentdb = session.CurrentDatabase
Set collection = currentdb.UnprocessedDocuments
If collection.Count = 0 Then
Messagebox "Sie haben keinen Eintrag markiert.", 64, "Adressen"
Exit Sub
End If 'If collection.Count = 0
If collection.Count = 1 Then
Set doc = collection.GetNthDocument(1)
If doc.Form(0) = "frmFirma" Then
eintrag = Trim$(doc.Vorname(0) & " " & doc.Name(0))
Else
eintrag = Trim$(doc.KontaktVorname(0) & " " & doc.KontaktName(0))
End If 'If doc.Form(0) = "frmFirma"
Else
Messagebox "Für die Erstellung einer Wiedervorlage darf nur ein Eintrag markiert sein.", 64, "Adressen"
Exit Sub
End If 'If collection.Count = 1
'Zugriff auf Maildatenbank und Prüfung ob im Kalenderprofil die Weckfunktion eingeschaltet ist.
MailDatenbank = Evaluate("@MailDbName")
If MailDatenbank(1) = "" Then
Messagebox "Auf Ihre Maildatenbank kann nicht zugegriffen werden.", 16, "Adressen - Fehler"
Exit Sub
End If 'If MailDatenbank(1) = ""
Set maildb = New NotesDatabase(MailDatenbank(0),MailDatenbank(1))
Set profile = maildb.GetProfileDocument("CalendarProfile")
If profile Is Nothing Then
Messagebox "Fehler beim Zugriff aus das Kalenderprofil Ihrer Maildatenbank.", 16, "Adressen - Fehler"
Exit Sub
Else
If profile.EnableAlarms(0) <> "1" Then
Messagebox "Im Kalenderprofil Ihrer Maildatenbank sind keine Alarmoptionen aktiviert." & Chr$(10) & _
"Es kann keine Wiedervorlage erstellt werden.", 48, "Adressen - Warnung"
Exit Sub
End If ' If profile.EnableAlarms(0) <> "1"
End If 'If profile Is Nothing
'Erstellen einer Erinnerung innerhalb der Maildatenbank des Users
Set wvdoc = New NotesDocument(maildb)
wvdoc.Form = "Appointment"
wvdoc.AppointmentType = "4"
wvdoc.ExcludeFromView = "D"
Set wvdoc.StartDateTime = datetime
Set wvdoc.CalendarDateTime = datetime
wvdoc.Subject = "Wiedervorlage für " & eintrag
If ws.DialogBox("tmDlgAlarm", True, True, False, False, False, False, "Wiedervorlage", wvdoc) = False Then Exit Sub
Set dateitem = wvdoc.GetFirstItem("tmpAlarmOnDate")
Set timeitem = wvdoc.GetFirstItem("tmpAlarmOnTime")
Set AlarmTime = New NotesDateTime(dateitem.DateTimeValue.DateOnly & " " & timeitem.DateTimeValue.TimeOnly)
Set wvdoc.ReminderTime = AlarmTime
Set wvdoc.StartDateTime = AlarmTime
Set wvdoc.CalendarDateTime = AlarmTime
Set wvdoc.~$AlarmTime = AlarmTime
Call wvdoc.ReplaceItemValue("$Alarm", 1)
AlarmSet = 1
wvdoc.RemoveItem("$AlarmOffset")
Call wvdoc.ReplaceItemValue("_ViewIcon",10)
wvdoc.OrgDontDoubleBook = ""
wvdoc.OrgTable = ORS_ITEM_CALENDAR
wvdoc.~$PublicAccess = "0" 'Allgemeinen Zugriff verhindern
Call wvdoc.ComputeWithForm(True,False)
Call wvdoc.Save(True,False,True) 'Sichern und als gelesen markieren
Call wvdoc.PutInFolder("$Alarms") 'Damit autom. Benachrichtigung erfolgt in entspr. Ordner kopieren
End Sub
Axel
-
Das werd ich doch gleich mal ausprobieren...
Danke !