Domino 9 und frühere Versionen > ND8: Entwicklung

Antwortdokumente bearbeiten

<< < (2/2)

koehlerbv:
Der einfachste Weg: Mach Deinen Button in die Ansicht und lass in der embedded view die Buhtongs mit anzeigen.

Bernhard

pimpfling:
Funzt super, danke :)

   Dim parentUnid As String
   Dim workspace As New NotesUIWorkspace   
   Dim uidoc As NotesUIDocument
   Dim db As NotesDatabase
   Dim Parent As NotesDocument   
   Dim collection As NotesDocumentCollection
   Dim currentResponse As NotesDocument
   Dim session As NotesSession
   Dim item As NotesItem
   Dim uiview As NotesUIView
   Dim doc As NotesDocument
   
   Set uidoc = workspace.CurrentDocument
   Set userdoc = uidoc.Document
   Set session = New NotesSession
   Set db = session.CurrentDatabase
   parentUnid = userdoc.UniversalID
   Set parent = db.GetDocumentByUNID (parentUnid )   
   Set collection = parent.Responses
   Set currentResponse = collection.GetFirstDocument
   Set uiview = workspace.CurrentView
   
   Set doc = db.GetDocumentByID(uiview.CaretNoteID)
   
   Set item = doc.ReplaceItemValue( "DC_ActiveDevice", "Yes" )
   Call doc.Save(True,True)
   
   If doc.GetItemValue( "DC_ActiveDevice" )(0) = "Yes" Then
      While Not currentResponse Is Nothing
         If doc.UniversalID <> currentResponse.UniversalID Then
            Set item = currentResponse.ReplaceItemValue( "DC_ActiveDevice", "" )
            Call currentResponse.Save( True, True )
            'Messagebox "Flag für Device " + currentResponse.GetItemValue( "DC_Device" )(0) + " gesetzt."
         End If
         Set currentResponse = collection.GetNextDocument(currentResponse)
      Wend
   End If
   
   Call Workspace.ViewRefresh   

Navigation

[0] Themen-Index

[*] Vorherige Sete

Zur normalen Ansicht wechseln