Domino 9 und frühere Versionen > Entwicklung

antwortdokument als uidoc aus dem backend erstellen?

(1/4) > >>

OCS:
hi leute,
habe eine db, von der aus ich in eine andere db gehe und mir ein dokument gezielt anhand der unid suche, funktioniert alles soweit.... hab ich die möglichkeit, jetz ein antwortdokument von diesem dokument im frontend zu erstellen? hoffe das war verständlich...

gruß

björn

zum besseren verständnis, der quelltext bis jetzt...


Sub Initialize
   Dim uidoc As notesuidocument
   Dim session As notessession
   Set session = New notessession
   Dim item As notesitem
   Dim workspace As notesuiworkspace
   Dim rtitem As notesrichtextitem
   Dim db As NotesDatabase
   Set workspace = New notesuiworkspace
   Dim collection As NotesDocumentCollection
   Dim doc As NotesDocument
   Dim currentdoc As NotesDocument
   Dim problem As String
   Set uidoc = workspace.currentdocument
   Dim temp As String
   Dim view As notesview
   Dim aktivid As String
   Dim aktivdoc As notesuidocument
   Dim newdoc As notesuidocument
   
   
   Set currentdoc = uidoc.Document 
   Call uidoc.save   
   aktivid = uidoc.fieldgettext("aktiv_id")
   
   Call uidoc.save
   'Call uidoc.close
   
   
   Set db = session.Getdatabase("SCHMITT01/SCHMITT", "aktiv\aktiv003.nsf", False)
   Set view = db.getview ("ViewActionsUNID")
   Call view.Refresh
   Set collection = view.getalldocumentsbykey(aktivid)
   Set doc = collection.GetFirstDocument()
   Print collection.count
   
   
   und hier will ich ein antwortdokument auf doc erstellen!!!
   
End Sub

Marinero Atlántico:
In Pseudocode (heisst: die Methoden mögen anders heissen, aber im Groben sollte es stimmen)

--- Code: ---Dim docResp as yourResponse
set  docResp = db.createDocument
docResp.makeResponse(doc)

' wichtig. Vergisst man schnell:
docResp.save true, false

--- Ende Code ---

OCS:
sollte dann wohl jetzt so aussehen:

Sub Initialize
   Dim uidoc As notesuidocument
   Dim session As notessession
   Set session = New notessession
   Dim item As notesitem
   Dim workspace As notesuiworkspace
   Dim rtitem As notesrichtextitem
   Dim db As NotesDatabase
   Set workspace = New notesuiworkspace
   Dim collection As NotesDocumentCollection
   Dim doc As NotesDocument
   Dim currentdoc As NotesDocument
   Dim problem As String
   Set uidoc = workspace.currentdocument
   Dim temp As String
   Dim view As notesview
   Dim aktivid As String
   Dim aktivdoc As notesuidocument
   Dim newdoc As notesdocument
   
   
   Set currentdoc = uidoc.Document 
   Call uidoc.save   
   aktivid = uidoc.fieldgettext("aktiv_id")
   
   Call uidoc.save
   'Call uidoc.close
   
   
   Set db = session.Getdatabase("SCHMITT01/SCHMITT", "aktiv\aktiv003.nsf", False)
   Set view = db.getview ("ViewActionsUNID")
   Call view.Refresh
   Set collection = view.getalldocumentsbykey(aktivid)
   Set doc = collection.GetFirstDocument()
   Print collection.count
   
   Set  newdoc = db.createDocument
   
   Call newdoc.MakeResponse( doc )
   Call newdoc.Save( False, False )
   

  workspace.EditDocument True,newdoc
   

...


bekomme aber den fehler vorgabemaske nicht gefunden!!!

OCS:
k, hab noch

   newdoc.Form = "aktion"


eingafügt, jetz gehts.... leider übernimmt er keine daten aus dem mutterdokument!!!! an was könte das liegen??

koehlerbv:
Wenn Du im Backend arbeitest, werden natürlich keine Vorgabewerte übernommen. Da ist Handarbeit angesagt.

Bernhard

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln