Das Notes Forum
Domino 9 und frühere Versionen => ND8: Entwicklung => Thema gestartet von: pur_berger am 03.06.08 - 12:40:50
-
So - auf zum nächsten Problemchen ...
In einer Form laß ich im PostOpen folgenden Code laufen:
Sub Postopen(Source As Notesuidocument)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim item As NotesItem
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
Set item=doc.ReplaceItemValue( "ALLStatus",0)
End Sub
Läuft auch fast überall problemlos - nur bei einigen 8ter Clients (Standard) kommt "Variable not set". Wenn ich nun das Debug laufen lasse - nix. Nada. Läuft einfach durch und paßt und macht correct auf.
Gleich vorweg - nein - Scrpting ist für mich eigentlich ein Fremdwort und ja - ich mach das via Try and Error Prinzip. Irgend eine Idee was daran schuld sein könnte?
-
Den ganzen Code könnte man auf jeden Fall optimieren :
Sub Postopen(Source As Notesuidocument)
Dim doc As NotesDocument
Set doc = Source.Document
Call doc.ReplaceItemValue( "ALLStatus",0)
End Sub
Wobei ich noch ein Save empfehlen würde.
-
Danke - werd ich gleich mal testen!
-
So - also der Fehler mit "Variable not set" ist Weg - Danke. Aber - aus irgend einem Grund macht der Eclipsclient jetzt das Mail in einem Extra Fenster auf?!
Folden Codes sind jetzt hier im Ensatz:
PostOpen:
Sub Postopen(Source As Notesuidocument)
Dim doc As NotesDocument
Set doc = Source.Document
Call doc.ReplaceItemValue( "ALLStatus",0)
End Sub
QueryClose:
Sub Queryclose(Source As Notesuidocument, Continue As Variant)
Dim workspace As New NotesUIWorkspace
Dim doc As NotesUIDocument
Dim uidoc As NotesUIDocument
Set doc = workspace.CurrentDocument
Set uidoc = workspace.CurrentDocument
If doc.FieldGetText( "Z_Status" ) = "" And doc.FieldGetText( "ALLStatus" ) = "0" Then
Messagebox( "*** Please Note - You need to Accept or Decline the Handout!!! ***" ), 0 + 16
Continue = False
End If
If doc.FieldGetText( "AppProcessed" ) <> "Form Processed - Thank You" And doc.FieldGetText( "ALLStatus" ) = "0" Then
Messagebox( "*** Use Submit and Send Back to ISG to Close ***" ), 0 + 16
Continue = False
End If
End Sub
Ich seh nicht wirklich einen Grund warum das geschieht - auf allen anderen Clients läuft es problemlos (also allen nicht eclipse Clients) ...
-
Ich kann Dir an der Stelle nicht weiterhelfen, da wir noch auf 6.5 sind.
Allerdings solltest Du im PostOpen nach dem ReplaceItemValue auf jeden Fall ein Save absetzen, wenn Du später im QueryClose den Wert abfragen willst. Ansonsten existiert das Item nämlich nicht.