Domino 9 und frühere Versionen > Entwicklung

Feld automatisch mit Lotus Script ändern

(1/3) > >>

Fbaum:
Hallo,
nochmal ein Problem mit LS.
Dieses Script läuft wunderbar.
Ich möchte aber, daß das Status Feld automatisch geändert wird. (Siehe Fettgedrucktes!).

Sub Click(Source As Button)
   Dim workspace As New NotesUIWorkspace
   
   Dim feedback As  New NotesDatabase( "", "" )   
   Dim uidoc As NotesUIDocument
   Dim doc  As NotesDocument
   Call workspace.EditDocument( True )
   Set uidoc = workspace.CurrentDocument
   Set doc = uidoc.Document
   Set feedback = New NotesDatabase("Mein_Server", "Meine_DB.nsf")
   Call uidoc.FieldSetText ( "Form_Status", "92 Reviewers Notified" )
   Call doc.CopyToDatabase( feedback )
   Dim session As New NotesSession
   Dim db As NotesDatabase
   
   '
   Set db = session.CurrentDatabase
   'Set newdoc = New NotesDocument( db )
   Dim rtitem As NotesRichTextItem   
   Set rtitem = New NotesRichTextItem( doc,  "Body" )
   Call rtitem.AppendDocLink( feedback, db.Title )
   
   doc.Form = "Memo"
   'doc.SendTo = SendTo
   doc.Subject = "Document for review. (Click icon to access database.)"
   Call doc.Send( False )
   Call doc.Save(False,True )
      Call uidoc.Close
End Sub


Das funktioniert auch. Nur wenn das Script abgearbeitet ist, wird wieder der ursprüngliche Wert, bzw. gar kein Wert eingetragen.
Was habe ich da denn falsch gemacht??
Danke für Eure Info.
Gruß FBaum

ata:
... gibt es in dem Feld eine Formel?...

ata

Fbaum:
Hallo,
das Feld ist eine Dialogfeld und wird über einen DBLookup gefüllt.
Wenn ich es in einem anderen Feld mache (mit dem gleichen DBLookup) und ich mach die Formel
@SetField("Status";"dsfsdf") dann funktionierts.
Gruß FBaum

Axel:
Hi,

hmm..., auf den ersten Blick kann ich im Script keinen Fehler entdecken. Mir ist eines aufgefallen, du verwendest einmal Frontend-Befehle und einmal Backend-Befehle. Das sollte eigentlich funktionieren, aber man weiß nie.

Ändere mal die Zeile in:

Call doc.Form_Status = "92 Reviewers Notified"
   
Ausserdem schau die mal das Feld an. Gibt es irgendeine Formel z.B. in der Eingabeübersetzung oder Eingabevalidierung ?

Axel

ata:
... probier die Zuweisung mal mit...

doc.Form_Status = "92 Reviewers Notified"

ata

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln