Das Notes Forum
Domino 9 und frühere Versionen => Entwicklung => Thema gestartet von: Kermit am 17.09.02 - 17:19:38
-
>:( Hallo Zusammen !
Ich bin nicht nur in diesem Forum ein Frischling sondern auch in Sachen Notes.
Ich möchte gerne bestehende Stammdaten aus einem vorhandenem Dokument per Button in ein neues Dokument übertragen und dieses neue Dokument zum bearbeiten anzeigen.
EASY ? (Habe aber keinen Schimmer wie ich das anstellen soll).
Vielen Dank im voraus.
Kermit
-
Hi,
da du nicht geschrieben hast, wo du das neue Dokument anlegen willst, nehme ich mal an, dass du es aus dem Dokument, aus welchem die Daten übernommen werden sollen, anlegen willst.
Dazu brauchst du einen Aktionsbutton mit folgendem Script.
Dim workspace As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim newdoc As NotesDocument
Dim newuidoc As NotesUIDocument
Set db = session.CurrentDatabase 'Aktuelle Datenbank
Set uidoc = workspace.CurrentDocument 'Zugriff auf aktuelles Dokument
Set doc = uidoc.Document
'Neues Dokument anlegen
Set newdoc = New NotesDocument(db)
newdoc.Form = "Maskename" 'Zuweisung mit welcher Maske das Dokument erstellt werden soll
'Datenübernahme aus aktuelle Dokument
newdoc.Feldname1 = doc.Feldname1
newdoc.Feldname2 = doc.Feldname2
Set newuidoc = workspace.EditDocument(True, newdoc) 'Neues Dokument anzeigen
Den Maskenname und die Feldnamen musst du natürlich an deine Gegebenheiten anpassen.
Axel
-
:)
Hallo Axel !
Ich bin begeistert. Das funktioniert prima.
Vielen Dank für Deine Mühe.
Du hast mir wirklich sehr geholfen.
Gruß
Kermit