I’m working on an action to create a new “To Do” in a user’s mail file using information from a open Helpdesk ticket- Thanks for the help in a prevous post.What I want to do is have the ability to create the new “To Do” from an action button while the current helpdesk ticket is open. With the code below I am bringing up a new “To Do” but none of the information from the helpdesk ticket is being populated.
Form names:
CR- Helpdesk Request
Task- To Do form in the users mail db
Field Names-
CR.Subject map to Task.subject
CR.calldate map to Task.StartDate
CR.description map to Task.body
I have attached my LotusScipt for your evaluation and comment:
Sub Click(Source As Button)
Dim session As New NotesSession
Dim ws As New NotesUIWorkspace
Dim maildb As Notesdatabase
Dim taskuidoc As NotesUIDocument
Dim CRuidoc As NotesUIDocument
Dim taskdoc As NotesDocument
Dim CR As NotesDocument
Dim taskbody As Variant
Dim subject, calldate, description As Variant
Dim StartDate, Body As Variant
Set CRuidoc = ws.CurrentDocument
Set maildb = New NotesDatabase("","")
maildb.OpenMail
Set taskuidoc = ws.ComposeDocument(maildb.Server, maildb.FilePath, "Task")
Set CR = CRuidoc.Document
CR.Form = "CR"
CR.subject = taskdoc.Subject
CR.calldate(0) = taskdoc.StartDate(0)
CR.description = taskdoc.Body
End Sub
Thanks for any help or pointers.