Question

I need to create tasks in a SharePoint Task List with c#.

Can I use SharePoint API like SPList.Items.Add() ? I will not be monitoring the task changes after creation. Or Should I consider using Outlook API?

Was it helpful?

Solution

You got it right the first time.

Use the SharePoint object model. It's pretty easy to work with and reasonably intuitive. The only things you need to watch our for are populating the fields (check they exist first as SharePoint is customisable and someone could delete or rename a field), and when you've created the SPWeb and SPSite objects, be sure to dispose() of them afterwards.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top