none
SharePoint 2013 workflow using Visual Studio 2012 RRS feed

  • Question

  • Hi Friends,

    I am trying to create a SharePoint 2013 workflow using Visual Studio 2012.I am trying to create "CreateListItem,UpdateListItem,DeleteListItem" activities.But in VS2012 we no need to write any code for this List activities.But we need to set the ListItemProperties.How can we set this?I am new to SP2013 workflows.Can any one help me on same.

    Thanks,

    Tiru


    tirupal

    Wednesday, July 10, 2013 8:58 AM

All replies

  • Hi tirupal,

    Do you want to update the item attribute in your SharePoint 2013 workflow? If I misunderstood you, please let me know if you fell free.

      using (SPSite oSPsite = new SPSite("http://website url/"))

               {

                   using (SPWeb oSPWeb = oSPsite.OpenWeb())

                   {

                       oSPWeb.AllowUnsafeUpdates = true;

                       SPList list = oSPWeb.Lists["MyList"];

                       SPListItem itemToUpdate = list.Items[0];

                       itemToUpdate["Description"] = "Changed Description";

                       itemToUpdate.Update();

                       oSPWeb.AllowUnsafeUpdates = false;

                   }

               }

    You can also refer to the following link.

    http://raquelalineblog.wordpress.com/2013/05/03/sharepoint-2013-create-a-vs-2012-workflow/

     

    Thanks,

    Jack


    Jack Gao
    TechNet Community Support

    Thursday, July 11, 2013 7:04 AM
    Moderator
  • Hi Jack,

    You know SharePoint 2013 workflows using Visual Studio 2012 we don't write any code for "Create,Update and Delete" list items.We have all the activities in VS2012,just we drag and drop those activities and we can apply the coditions and we can perform this activities.

    Thanks,

    Tiru


    tirupal

    Thursday, July 11, 2013 7:26 AM