Thursday, March 13, 2008

MOSS VisualStudio Workflow create folder in task list

To create a folder in the assigned task list of the workflow do following:

// get the task list for the read receipts
SPList taskList = workflowProperties.TaskList;

// create a folder with the document name
SPListItem documentFolder = taskList.Items.Add(taskList.RootFolder.ServerRelativeUrl, SPFileSystemObjectType.Folder);

documentFolder["Name"] = "new folder name";

No comments: