Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

Create new workspace programmatically

  Asked By: Hemali Makwana         Date: Apr 29, 2009      Category: Sharepoint      Views: 339
 

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
information.

public sealed partial class Workflow1 : SequentialWorkflowActivity
{
public Workflow1()
{
InitializeComponent();
}

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

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.


Do you know someone who can help? Share a link to this thread on twitter, or facebook.

Tagged:        

 

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.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].