Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Create new workspace programmatically

  Asked By: Hemali    Date: Apr 29    Category: Sharepoint    Views: 1753

I am still new to Sharepoint, and what I am trying to do is create
a workflow (or event handler) that will take information from a list
item, feed it into the creation process, and then write back a link to
the workspace to the original item.

i found this example, and this works, but it doesn't have any dynamic

public sealed partial class Workflow1 : SequentialWorkflowActivity
public Workflow1()

public Guid workflowId = default(System.Guid);
public SPWorkflowActivationProperties workflowProperties = new

private void onWorkflowActivated1_Invoked(object sender,
ExternalDataEventArgs e)
SPSite oSiteCollection = new SPSite("http://SPVM");

SPWeb oWebSite = oSiteCollection.OpenWeb();

SPWebCollection oSitesCollection = oWebSite.Webs;

SPWeb newWebSite = oSitesCollection.Add("abc", "Document Workspace",
"This is site created through code.", 1033, "STS#2", true, false);


How do i get and write information back to the original list item that
started off the event or the workflow?
basically what I'd like to do is take the "title" field and make that
the name of the workspace, and then write back the link to the new
workspace into a column called "workspace".
right now i have this code sample in a workflow that starts with the
item being created.



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on Create new workspace programmatically Or get search suggestion and latest updates.