I have designed an Application which was initially designed on R5 designer.It has a form which generates email memo(using the current mail DB) appending some contents of the form after it is saved. In R5 client and mail template, it works fine. Just clicking the send button sends the mail. But In R6 client and template, while its been clicked it sends the mail and also pops up message saying that there is conflict , saving the document. While I click Yes, it creates conflict in sent items but if No, also the recipient gets the mail.
-----------The Script---------------------
Sub NotifyAuthorJobAssigned( FormName As String, MableDoc As NotesDocument)
Set ws = New NotesUIWorkspace
'Set uiDoc = ws.CurrentDocument
Set session = New NotesSession
Set db = session.CurrentDatabase
Set maildb = New NotesDatabase("","")
maildb.OpenMail
Set profile = maildb.GetProfileDocument("CalendarProfile")
SendToName = MableDoc.Author(0)
TextMessage = Chr(10)& "Dear" &Space$(1) & SendToName & Chr(10)&Chr(10)_
&"MAVIS Support have received your" & Space$(1) & FormName & Space$(1) & "and it has been assigned the number" & Space$(1) & MableDoc.IDNoDisplay(0) &"."_
&Space$(1)&"For further information on the status of your request please see the MABEL database."&Chr(10)&Chr(10)_
& FormName &":"&Space$(1)
Set mailnote = New NotesDocument(maildb)
mailnote.SendTo = SendToName
mailnote.ReplyTo = "MAVIS Help"
mailnote.Form = "Memo"
'mailnote.Logo = session.GetEnvironmentString("DefaultLogo",False)
mailnote.Principal = profile.Owner(0)
mailnote.Logo = profile.DefaultLogo(0)
mailnote.Subject="MAVIS"&Space$(1) & FormName &Space$(1) & "No."& Space$(1) &MableDoc.IDNoDisplay(0)
Set rtItem = New NotesRichTextItem( mailnote, "Body" )
Call rtItem.AppendText(TextMessage)
Call rtItem.AppendDocLink( MableDoc,"")
TextMessage2 = Chr(10)&Chr(10)&"Regards" &Chr(10)_
&"MAVIS Support Team"
Call rtItem.AppendText(TextMessage2)
Call mailnote.Save( True, True )
Call ws.EditDocument(True,mailnote)
Call mailnote.Remove( True )
Set ws = Nothing
Set session = Nothing
Set db = Nothing
Set maildb = Nothing
Set mailnote = Nothing
Set profile = Nothing
End Sub