Domino 9 und frühere Versionen > ND8: Entwicklung

Dokumentlink

<< < (2/4) > >>

Peter Klett:

--- Zitat von: pram am 23.07.12 - 09:37:48 ---am Ende fehlt noch ein
Call rtitem.update()

Gruß
Roland



--- Ende Zitat ---
Kommt drauf an, was er weiter mict dem Dokument macht. Er ist ja im Backend ...

pram:
@Peter
ich hab festgestellt, dass die zuvor durchgeführten RT-Aktionen manchmal "verschluckt" werden, wenn man sie nicht mit .update()  (oder .compact) abschließt.
Darum hab ich mir angewöhnt, IMMER am Schluss ein update auf dem RT-Item aufzurufen.

Dies steht auch so in der Hilfe zu .update():

--- Zitat ---Operations on a rich text item are queued for efficiency. The order and time of completion are not predictable. Use this method to ensure that processing is complete at a certain point.
--- Ende Zitat ---

was meinst du mit "Er ist ja im Backend.."? RT-Items kann man ja sowieso nur im Backend ändern.

Gruß
Roland

RonMat:
Danke für Euere Zeit, zur besseren Verständlichkeit: ich hole ein paar Informationen aus der Email, erstelle eine neue Form und schreibe diese Werte dort gleich hinein ( das funktioniert auch), nun möchte ich den Link in ein Feld in der neuen Form einfügen der den Link zum Mail enthält ( das funzt nicht).
Mein Script hierfür:
' EMAIL auslesen
   Dim session As New NotesSession
   Dim sourcedb As NotesDatabase
   Dim collection As NotesDocumentCollection
   Dim doc As NotesDocument
   Set sourcedb = session.CurrentDatabase
   Set collection = sourcedb.UnprocessedDocuments
   Set doc = collection.GetFirstDocument()
   Dim res1,res2 As variant
   While Not(doc Is Nothing)
      
      res1=doc.Getitemvalue("From")
      res2=doc.getitemvalue("Subject")
      Set doc = collection.GetNextDocument(doc)
   Wend
   'Initialisierung Target
   Dim targetdb As New NotesDatabase( "NAPPDEHAM01", "Databases\IT\Helpdesk.nsf" )
   Dim targetsession As New NotesSession
   Dim db As NotesDatabase
   Dim targetdoc As NotesDocument
   
   'Link herstellen
   Dim newDoc As NotesDocument
   Dim rtitem As NotesRichTextItem
   Set newDoc = New NotesDocument( sourcedb )
   Set rtitem = New NotesRichTextItem( newDoc, "Doc_link" )
   Call rtitem.AppendDocLink( targetdb, targetdb.Title )
   Call rtitem.update()
   
   'Target Database
   
   
   Set db = targetsession.CurrentDatabase
   Set targetdoc = targetdb.CreateDocument
   
   'Auffüllen der Felder in der Form "User Call"
   targetdoc.form="User_Call_New*19_07_12"
   targetdoc.Call_Contact=res1
   targetdoc.Comment=res2
   Call targetdoc.save(True,True)

ascabg:
Hallo,

Wie schon geschrieben wurde, wird hier in diesem Fall kein Dok-Link erstellt, sondern ein Datenbanklink.

Dieser Verweis auf die Datenbank in targetdb

--- Zitat ---Dim targetdb As New NotesDatabase( "NAPPDEHAM01", "Databases\IT\Helpdesk.nsf" )
--- Ende Zitat ---

Und wenn es denn ein Dok-Link werden soll, nochmal die Frage, ist in dieser Datenbank eine 'Vorgabeansicht' definiert.


Andreas

RonMat:
Ich gebe ascabg Recht.  Ich habe das wohl komplett übersehen.

Navigation

[0] Themen-Index

[#] Nächste Seite

[*] Vorherige Sete

Zur normalen Ansicht wechseln