Domino 9 und frühere Versionen > ND6: Entwicklung
Datenübertragung zwischen Dokumenten
umi:
Da war Axel schneller :--)
ja genau
z.b. mit
...
on error 4091 resume next
set parentDoc = db.getDocumentByUnid(docunid)
if not parentDoc is nothing then
doc.Feld = parentdoc.getitemvalue("Feld")(0)
.
.
.
end if
Andreas Huhn:
Hallo Umi, hallo Axel,
kriegs noch nicht ganz hin:
--- Code: ---
Sub Postpaste(Source As Notesuiview)
Dim docUnid As NotesDocument
Dim docCol As NotesDocumentCollection
Dim doc As NotesDocument
Set docCol = Source.Documents
Set doc = docCol.GetFirstDocument
Set docUnid = doc.ParentDocumentUNID
docUnid.ProjectNo = doc.ProjectNo
Call docUnid.Save(True, False)
Messagebox "test"
End Sub
--- Ende Code ---
umi:
--- Code: ---
Sub Postpaste(Source As Notesuiview)
Dim docUnid As NotesDocument
Dim docCol As NotesDocumentCollection
Dim doc As NotesDocument
dim db as notesdatabase
Set docCol = Source.Documents
Set doc = docCol.GetFirstDocument
set db = doc.parentDatabase
on error 4091 resume next
Set docUnid = db.getDocumentByUnid(doc.parentDocumentUNID)
if not docUnid is nothing then
docUnid.ProjectNo = doc.ProjectNo
Call docUnid.Save(True, False)
end if
Messagebox "test"
End Sub
--- Ende Code ---
Andreas Huhn:
Klasse, nun klappts! Danke!
Lese grad noch ein wenig in der Hilfe über die Save-Methode und allgemein das Error-Handlich nach.
Vielen Dank euch beiden!
Navigation
[0] Themen-Index
[*] Vorherige Sete
Zur normalen Ansicht wechseln