Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Outlook Task from SQL Trigger

Status
Not open for further replies.

pxh12

Programmer
Aug 19, 2009
4
GB
Hi, bit of a long shot here.

I need to be able to create/delete tasks on users exchange mailboxes from SQL2005 when certain triggers are fired.

I have a table containing a list of tasks allocated to different employees. Columns are as follows:

TaskID - Unique Task ID (PK)
TaskEmployeeID - Employee ID (identical to domain user name)
TaskStartDate - Start Date of Task
TaskDueDate - Due Date of Task
TaskEndDate - End Date of Task
TaskDetail - Detail of Task
TaskCategory - Task Category

Basically, whenever a task is assigned to an employee, I need a trigger to raise a task in that employee's Outlook task list. Also, when a task is re-assigned to a different user, I need it to be deleted from the original employee's task list.

I can handle updating SQL when a task is completed using an Outlook Macro, just stuck on connecting to the mailboxes from SQL. Any ideas?
 
Not sure how to do the Outlook part, but I suggest you send the data in the trigger to a separate table and then run a job every five minutes to send out the task notifications from the data in that table (and update them as sent). This way if the Outlook server goes down, the inserts/updates to the orginal table don't go down along with it. It's not that hard to send an email from data in a table, but not sure at all how to convert it to a task. Yoou might ask in the Outlook forums to see if an email can automatically be converted to a task.

"NOTHING is more important in a database than integrity." ESquared
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top