Domino Code Fragment

Code Name*
Script changes the an item on each document selected in a view
Date*
04/29/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.133.86.172
Description*
This view action script changes the Status item on each document selected in a view. If someone else edits one of the documents at the same time, the document is not saved. Instead, a response document that contains the change to the Status item is created and saved.
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Dim j As Integer
Set db = session.CurrentDatabase
Set collection = db.UnprocessedDocuments
For j = 1 To collection.Count
Set doc = collection.GetNthDocument( j )
doc.Status = "Processed by view action"
Call doc.Save( False, True )
Next
End Sub