Programmatically creating tasks

21/12/2004 - 14:33 por Sempronio | Informe spam
Hi all,
I'm developing a workflow webpart/add-in for SharePoint, and need to
programmatically create/assign tasks with a specific title/description to
specific users/groups. I didn't find any info to do it from code (.NET,
either C# or VB.NET is ok). Do you have any info? The only place where I
found the data of the sample tasks I created (from the browser) for a user
is the UserData table in the SP's SQL Server database...but I don't like the
idea to write directly to the DB, as I don't know the structure of that
table, and what I'm supposed to write, exactly. Isn't there any object model
that allows to create/assign tasks more easily, and in a safer way?
Thank you for your help,
- sempronio

Preguntas similare

Leer las respuestas

#1 Gustavo
21/12/2004 - 18:09 | Informe spam
Hi Sempronio,
I presume you have a Tasks Library in your site, and you like to insert new
tasks in a programmatically way in the Library. If this is the case, you can
use the API of SharePoint: you have a SPWeb class (the page where you have
insert the Tasks Library), with a collection of the type SPListCollection;
each SPList object of this collection have also a Item collection of the type
SPListItem; the SPListItemCollection have an Add and Delete method that you
can use to insert of delete a new task. Don't forget to use the Update method
each time that you use the Add of Delete method. In de SDK of SharePoint you
can find more information (see
http://msdn.microsoft.com/library/d...ionAdd.asp)
Suerte,
Gustavo


"Sempronio" wrote:

Hi all,
I'm developing a workflow webpart/add-in for SharePoint, and need to
programmatically create/assign tasks with a specific title/description to
specific users/groups. I didn't find any info to do it from code (.NET,
either C# or VB.NET is ok). Do you have any info? The only place where I
found the data of the sample tasks I created (from the browser) for a user
is the UserData table in the SP's SQL Server database...but I don't like the
idea to write directly to the DB, as I don't know the structure of that
table, and what I'm supposed to write, exactly. Isn't there any object model
that allows to create/assign tasks more easily, and in a safer way?
Thank you for your help,
- sempronio




email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaRespuesta Tengo una respuesta
Search Busqueda sugerida