I'm modifying a Mail R7 template (dwa7.ntf) to provide basic multiple user functionality (People can accept the mail to deal with so others don't also pick it up and a target date and status field added).
I have a button that users click to accept the mail and one to close it after they've dealt with it. It's working fine apart from a stray Save/Save And Send/Discard/Send Only message that comes up when trying to close the mail.
Here's my button code:-
Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim s As New NotesSession
Dim uidoc As NotesUIDocument
Dim doc As notesDocument
Dim db As NotesDatabase
Set db = s.CurrentDatabase
Set uidoc = ws.CurrentDocument
Set doc = Uidoc.Document
Dim iResponse As Integer
iResponse = Msgbox("Are you sure?", 36, db.Title)
If iResponse <> 6 Then
Exit Sub
End If
If (uidoc.EditMode = False) Then
uidoc.EditMode = True
End If
Call uidoc.FieldSetText("Status
","02")
Call uidoc.FieldSetText("Accept
edBy",s.Co
mmonUserNa
me)
Call uidoc.FieldSetText("DateAc
cepted",Cs
tr(Now))
Call uidoc.Save()
Call uidoc.close()
Msgbox "You have accepted this query.", 64, db.Title
End Sub
Surely as I'm calling the save and then close, it shouldn't need to ask whether I want to save/discard etc? How can I stop this message and just exit the document after saving the changes i've made?
Originally I done this in a R5 db years ago and I had to use the front end doc as I couldn't get it to work using the backend document for some reason. The db needs upgrading, so I'm trying to replicate the changes into a R7 db and I get the extra unwanted/confusing save box.
Any suggestions?
Start Free Trial