Ok I have created a form that we are using as a helpdesk product. I can get the form when someone saves the form to send an email to the people who need to know when the person creates this in the notes client. Here is part of the code I am using
Sub NotifyManagers
'Database Configuration document has the manager names.
Dim colorProfile As NotesDocument
Set colorProfile = db.GetProfileDocument( "ColorProfile" )
'The "Managers" field should contain at least one value.
If( colorProfile.Managers(0) = "" ) Then
ok = Messagebox( "Notification could not be sent to the Work Request managers. " + _
"Please read the Using This Database document, and complete the Database Configuration settings.", 16, db.Title )
Exit Sub
End If
Dim managers As NotesItem
Set managers = colorProfile.GetFirstItem( "Managers" )
If( managers Is Nothing ) Then Exit Sub
'Create new memo
Dim memo As New NotesDocument( db )
memo.SendTo = managers.Values
'subject
memo.Subject = "Please assign New VPN Request: " + session.CommonUserName + ", " + note.Urgency(0)
'icon to display in mailbox
memo.~_ViewIcon = 3
memo.Form = "Bookmark"
'special fields on the Bookmark form
memo.InheritedDBTitle = db.Title
memo.InheritedSubject = note.Problem(0)
memo.FlowStatus = "Please assign this New VPN Request. Follow the doclink below."
'rich text field with doclink
Dim body As New NotesRichTextItem( memo, "Body" )
Call body.AppendDocLink( note, "" )
'Send email
Call memo.Send( False, False )
End Sub
Sub NotifyNewOwner
'Customer's name
Dim WRFrom As NotesName
Set WRFrom = New NotesName( note.WRFrom(0) )
'Create new memo.
Dim assignTo As NotesItem
Set assignTo = note.GetFirstItem( "AssignTo" )
If( assignTo Is Nothing ) Then Exit Sub
Dim memo As New NotesDocument( db )
memo.SendTo = assignTo.Values
If( memo.SendTo(0) = "" ) Then Exit Sub
'subject
memo.Subject = "Please take care of a new VPN Request: Urgency = " + note.Urgency(0) + "; Priority = " + note.Priority(0)
'icon to display in mailbox
memo.~_ViewIcon = 3
memo.Form = "Bookmark"
'special fields on the Bookmark form
memo.InheritedDBTitle = db.Title
memo.InheritedSubject = note.Problem(0)
memo.FlowStatus = "Your customer is " + WRFrom.Common + ". Follow the doclink below."
'rich text field with doclink
Dim body As New NotesRichTextItem( memo, "Body" )
Call body.AppendDocLink( note, "" )
'Send email
Call memo.Send( False, False )
Print WRFrom.Common + " has been notified."
End Sub
Sub NotifyNewCustomer
'Customer's name
Dim WRFrom As NotesName
Set WRFrom = New NotesName( note.WRFrom(0) )
'Create new memo
Dim memo As New NotesDocument( db )
memo.SendTo = note.WRFrom(0)
'subject
memo.Subject = "Your New VPN Request has been Received, it is " + note.WRNumber(0)
'icon to display in mailbox
memo.~_ViewIcon = 3
memo.Form = "Bookmark"
'special fields on the Bookmark form
memo.InheritedDBTitle = db.Title
memo.InheritedSubject = Left$( note.Problem(0), 200 ) + " ..."
memo.FlowStatus = ""
'rich text field with doclink
Dim body As New NotesRichTextItem( memo, "Body" )
Call body.AppendText( "If you have additional comments, please follow the doclink below and update your Work Request." )
Call body.AddNewline( 2 )
Call body.AppendDocLink( note, "" )
'Send email
Call memo.Send( False, False )
Print WRFrom.Common + " has been notified."
End Sub
Now this all works great when submitted in the notes client but when the person does this via the web everything gets created liek its supposed to be no notifications are sent. I am curious how I can get this to work from the web as we are trying to make this so they only use the web to submit this to us. Any help would be great as I am just learning Domino Design and it all looks greek to me as I am a admin type person… Thanks in advance