Das Notes Forum

Domino 9 und frühere Versionen => ND6: Entwicklung => Thema gestartet von: chris2212 am 05.05.04 - 10:12:17

Titel: PickList Selektion als DocLink
Beitrag von: chris2212 am 05.05.04 - 10:12:17
Hallo,

ich muss die in der PickList selektierte Adresse
al DocLink im aktuellen Document ablegen.

Funktioniert auch soweit, den DocLink habe ich im
BackEnd erzeugt.
Anschl. wird das doc mit doc.save gespeichert.

Mein Problem ist aber, dass ich beim
doc.close jetzt immer die MsgBox
Do you want to save your changes? drückt der User jetzt
ja, dann speichert mein FrontEnd Document ein leeres
RichText Feld ab und mein DocLink ist weg.
Wählt der User Nein, dann passt es, eigentlich.

Wie kann ich das Document verlassen ohne das
die Aufforderung zum speichern kommt?

Für jede Unterstützung dankbar !!

Sub Click(Source As Button)
   
Dim ws As New NotesUIWorkspace
Dim linkDoc As NotesDocument
Dim doc As NotesDocument
Set doc = ws.CurrentDocument.Document   
Dim ritem As New NotesRichTextItem(doc,"Body")
Dim collection As NotesDocumentCollection
   
Set collection = ws.PickListCollection(_  
1,_
False,_
"Server-Name",_
"DB-Name",_
"(View-Name)",_
"Address - Selection", _
"Please select a Address.")
If collection.Count <> 1 Then
Messagebox "Please Select a Address."
Exit Sub
End If
Set linkdoc = collection.GetFirstDocument

Call doc.ReplaceItemValue("DocLinkAdrPhone",linkDoc.AdrPhoneComplete)
Call doc.ReplaceItemValue("DocLinkAdrCompany",linkDoc.AdrOrganization)

If Not doc Is Nothing Then
Call ritem.AppendDocLink(linkdoc,"Click to open the Document","")
End If
   
Call doc.Save(True,False,False)
End Sub


Danke & Gruß
Christian
Titel: Re:PickList Selektion als DocLink
Beitrag von: Axel am 05.05.04 - 14:02:23
Hi,

füge einfach bevor du das Dokument schließt ein Feld mit Namen SaveOptions ein und setze es auf "0". Dann sollte die Speicherabfrgae nicht mehr kommen.


Axel
Titel: Re:PickList Selektion als DocLink
Beitrag von: chris2212 am 06.05.04 - 08:33:01
 :) :) :)

   Danke !

Jetzt geht´s


Danke & Gruß
Christian
Titel: Re:PickList Selektion als DocLink
Beitrag von: Axel am 06.05.04 - 08:44:01
Hi,

setzt du den Thread bitte noch auf "Erledigt".

Danke.


Axel