Domino 9 und frühere Versionen > ND7: Entwicklung
Dokument duplizieren - WEB
(1/1)
RonMat:
Hallo Forum,
folgendes Problem: ich habe eine Datenbank erstellt und der User ist innerhalb Notes in der Lage das z.Z. sichtbare Dokument zu duplizieren ( einige Felder übernehmen die Werte aus dem UIDoc - andere sind danach bearbeitbar). Hierzu habe ich nachfolgenden Script erstellt und es funktioniert ohne Probleme. Wie mache ich es im WEB. Betätige ich den Button wird mir als Nachricht vom Explorer gesagt : das diese Seite nicht anzeigbar ist.
Wo liege ich falsch? Habe im Web nicht so viel Erfahrung und würde mich auf einen Hinweis freuen.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim docNew As NotesDocument
Set db = session.currentDatabase
Set uidoc = ws.currentDocument
Set doc = uidoc.document
Call doc.save(True, False)
Call uidoc.close
Set docNew = db.createDocument
docNew.Form = "Vessel"
docNew.Vessel = doc.vessel(0)
docNew.AGCode= doc.AGCode(0)
docNew.SAGCode = doc.SAGCode(0)
docNew.AGDesc = doc.AGDesc(0)
docNew.SAGDesc= doc.SAGDesc(0)
docNew.FYear = doc.FYear(0)
docNew.FMonth = doc.FMonth(0)
docNew.Inst = doc.Inst(0)
docNew.Service = doc.Service(0)
docNew.Voyage = doc.Voyage(0)
docNew.Bound = doc.Bound(0)
Call docNew.save(True, True)
Set uidoc = ws.EditDocument(True, docNew)
ascabg:
Hallo,
Arbeitest Du mit dem abgebildeten Code auch im Web?
Wenn ja.
Meines Wissens nach kannst Du im Web keine UI-Klassen verwenden.
Andreas
RonMat:
OK, das würde erklären daß das dann nicht funktionieren kann. Wie bekomme ich dann aber die Daten aus dem momentan geöffneten Document in den Zwischenspeicher um diese Werte beim erstellen eines neuen Documents zu übernehmen ( replacen).
Habe ich gerade ein Brett vorm Kopf?
m3:
Aus der Designer-Help, Kapitel "Creating fields that inherit values":
--- Zitat ---In web applications, the new document determines which document to inherit from based on the URL argument ParentUNID in the Domino URL command, for example:
http://server/db.nsf/InheritanceForm?OpenForm&ParentUNID=6b87e303374b19148525639a00506656
--- Ende Zitat ---
ascabg:
Auch das koennte hilfreich sein.
--- Code: ---set doc = NotesSession.DocumentContext
set newdoc = new NotesDocument(doc.ParentDatabase)
call doc.CopyAllItems(newdoc, true)
--- Ende Code ---
Nur mal so kurz herutergeschrieben. Keine Gewaehrleistung dafuer das der Code so auch funktioniert.
Andreas
Navigation
[0] Themen-Index
Zur normalen Ansicht wechseln