Workflow in SharePoint Online 2013

Is is possible to have dynamic workflow in Sharepoint? 
I want to create a workflow using visual studio or designer and the levels of approval in workflow will be controlled by a list. If the list contains 5 levels of approvers, workflow should be able to build 5 levels at runtime. If possible then, whether possible
in SharePoint online.
I am little new to Visual Studio workflow and office 365. 
Please help.

Hi Arun,
Thanks for posting your query, Kindly browse the below mentioned URL to achieve multiple level workflow, it uses Recall function to call workflow multiple times 
http://blogs.msdn.com/b/sharepointdesigner/archive/2012/08/16/a-sample-approval-workflow-which-can-be-recalled-by-initiator.aspx
Also,
check out below mentioned URLs
http://sharepointwf.codeplex.com/
http://amalhashim.wordpress.com/2013/03/14/sharepoint-custom-approval-workflow-with-dynamic-approvers-using-sharepoint-designer/
I hope this is helpful to you, mark it as Helpful.
If this works, Please mark it as Answered.
Regards,
Dharmendra Singh (MCPD-EA | MCTS)
Blog : http://sharepoint-community.net/profile/DharmendraSingh

Similar Messages

  • Design guidance: Site workflow for sharepoint online 2013 app store product

    CONTEXT:
    I am in the early design stage for a potential Office 365 Application Store application.
    My initial target customer is small businesses with under 100 employees.
    I will use a structured data store: Initial implementation should be local (lists or Access DB), but potentially scale up to an Azure database.
    My assumption is that the customer would already be Office 365 (2013) E3 customers and this product would be an add on.
    I like workflows because they are user-friendly: I would prefer to leverage the standard SharePoint workflows rather than reinvent the wheel, but I can implement my own workflow with a custom application if I need to.
    I am OK using C#, Access, JavaScript, JQuery, HTML, SQL... whatever gives the best solution. I prefer C#.
    I prefer a Visual Studio solution that I can manage in a source code repository.
    QUESTIONS/GUIDANCE:
    Can a standard SharePoint "Site Workflow" be part of a product delivered via an Office Application Store app?
    Can a Site Workflow work with an external Azure data connection? Can it work with a local Access database?
    Can I start with a SharePoint list, and easily migrate to an Azure database later?
    Or should I forget the standard site workflow completely and just build a C# application?
    Thanks for any guidance.

    Hi,
    First my question is what type of SharePoint Apps you are talking about? SharePoint Hosted, AutoHosted or Provider Hosted apps? For AutoHosted and Provider Hosted apps you have more control - as the apps will be running outside SharePoint and then you can
    run yourworkflow outside SharePoint. Still your app will be able to access SharePoint data using REST API and you have full control of which technology you would like to use your app (C#, asp.net etc.). With SharePoint Hosted apps, your app will be running
    inside SharePoint and you will have limited capabilities to customize - only JS will be allowed in SharePoint hosted apps. You can still use workflow but you can't use external data - unless it's configured through BCS. So my suggestion would be, if are looking
    for an add-ons like solution think about non-SharePoint hosted apps. However if you are thinking of limited capabilities, then think about SharePoint hosted apps.
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

  • How to get First Occurnece of SubString from any string using SharePoint Designer Workflow in SharePoint Online 2013(Office 365)

    Hello All,
    I am facing Problem in SharePoint Designer Workflow. The Problem is that while replacing some subtstring with Space from a string which contains item like {Test, Test, Test, Test}, It replaces all items.
    Below two line we are using in Workflow.
    Can any body suggest some soultion for Finding first ouucrence of ", " so that we can replace only first value from string not all. When String values are different then getting proper values but if String values are same with comma
    seperated then it replace all values.
    Please some body help and your help will be heighly appriciable.
    Thanks in Advance.
    Thanks,
    Vivek Kumar Pandey   

    Have you tried to use Regular Expressions instead of Replace?
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • SharePoint Online 2013 Workflows for one List stopped working after 07/08/2014

    Our client host application in Office 365 SharePoint Online 2013, and we just found that all workflows for one list stopped working after 7, Aug 2014. It kept displaying pop-up message "Something went wrong. To try again, reload the page and then start
    the workflow." when manually start a workflow for this List.
    Tested workflow for other list, there's no problem.
    Could anyone can help on this issue?

    Our client host application in Office 365 SharePoint Online 2013, and we just found that all workflows for one list stopped working after 7, Aug 2014. It kept displaying pop-up message "Something went wrong. To try again, reload the page and then start
    the workflow." when manually start a workflow for this List.
    Tested workflow for other list, there's no problem.
    Could anyone can help on this issue?

  • Form and Workflow in SharePoint Online vs SharePoint On-Premise

    Hi Expert,
    I have the question about Form and Workflow in SharePoint Online vs ShrePoint On-Premise
    Current Problem : Customer is implemented Form and Workflow in SharePoint Online but they have a problem some features that didn’t work in SharePoint Online. I will have a meeting to discuss Do and Don’t Form and Workflow in SharePoint Online compare SharePoint
    On-Premise.
    Please suggestion.
    Thank you

    Hi MasterBird,
    For SharePoint 2013 On-premise, we can :
    Comlete control of our environment and data
    Supports heavy customization
    Keep sensitive information in-house
    Easier integration into line of business systems
    Full development options for developers
    For SharePoint Online workflow:
    Workflow 2010 & 2013 are available with Standard and Enterprise Editions without having to install
    If using Windows Azure workflow functionality is the same as 2013
    Cannot create custom Visual Studio workflows
    For InfoPath Form Services you will need Office 365 Enterprise Could Edition or SharePoint Online Plan 2
    More information, please refer to the video:
    http://www.youtube.com/watch?v=eNtCH3qOk2g
    Best Regards,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • What are the different tools and techniques available to track analytics in SharePoint online 2013?

    I want to know What are the different tools and techniques available to track analytics in SharePoint online 2013. Please provide your suggestions/ inputs. Thanks in advance.

    you can Use the Web Analytics Integration app  to
    connect your SharePoint Online public website to third-party web analytics services, such as Webtrends, Google Analytics, Adobe, and so on.
    Google Analytics
    Webtrends for SharePoint
    CARDIOLOG ANALYTICS
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Replicating Circulation workflow in Sharepoint Online

    Hi,
    I am looking at replicating the circulation workflow in SharePoint Online, but without success.
    The requirement is to send a policy document to one or more employees and capture their "signature" - could be just a text field with their name printed in - when they press "I agree" button.
    Idea is to make a new employee read through and capture their consent in some way.
    I did research third party products like DocRead, but I am looking for something simple and within SharePoint Online.
    I am not a C# programmer - greatly appreciate your help!
    Regards,
    E K

    Only way is to achieve it using Javascript. No out of box option available
    http://sharepoint.stackexchange.com/questions/71014/show-users-page-document-on-first-time-login
    Create list of users on site root. In list create boolean field for Policy agreement. Then you can use jQuery on checked. Code needs to be adjusted. I removed a lot from working code I use in similiar solution.
    $(document).ready(function() {
    $("input[id$='BooleanField']").click(function(){
    if($(this).is(':checked')) {
    var taskDesc = $($(this).closest('tr').children(":first")).eq(0).text();
    completeSelectedTask(taskDesc);
    function completeSelectedTask(taskDesc) {
    var queryStr = "<Query> <Where><And><Eq> <FieldRef Name='Assignee'/> <Value Type='Text'>" + loginName + "</Value> </Eq><Eq> <FieldRef Name='Title'/> <Value Type='Text'>" + taskDesc + "</Value> </Eq></And></Where> </Query>";
    $().SPServices({
    operation: "GetListItems",
    async: false,
    listName: "SharePointCustomUserListNameHERE",
    CAMLQuery: queryStr,
    CAMLViewFields: "<ViewFields> <FieldRef Name='Title' /><FieldRef Name='Assignee' /><FieldRef Name='Completed' /> </ViewFields>",
    completefunc: function (xData, Status) {
    CompleteListItem(xData, status)
    function CompleteListItem(xData, status) {
    var itemId;
    var itemTitle;
    $(xData.responseXML).find("z\\:row").each(function () {
    itemId = $(this).attr("ows_ID");
    itemTitle = $(this).attr("ows_Title");
    $().SPServices({
    operation: "UpdateListItems",
    aysnc: false,
    batchCmd: "Update",
    ID: itemId,
    listName: "SharePointCustomUserListNameHERE",
    valuepairs: [["Completed", "True"]],
    completefunc: function(xData, Status) {
    if (Status == 'success') {
    //var msg = "The assigned task '" + itemTitle + "' has been marked as complete.";
    //messageId = SP.UI.Notify.addNotification(msg, false);
    else {
    alert(Status +' : There was a problem adding your information to the database. Please try again or contact Internal Support at 812-468-1000.');
    This should all go into site page where user list was created. You could then add javascript code to home page to check if user has task completed in list. If not then redirect to your site page mentioned above.
    If this helped you resolve your issue, please mark it Answered

  • Visio Web Access Refresh in SharePoint Online 2013

    I'm trying to pull in SharePoint Online 2013 List data into a Visio Pro 2013 diagram and then serve the diagram into a SharePoint Online Page under a Visio Data Access Web Part.
    I have no working knowledge of Visio, but made a data connection and presented SPO list data on my diagram. But the data appears to be static when deployed to the Visio Access Web Part - even when I manually refesh.   I think, I'm not correctly
    adding list fields to my document. 
    I've set  refresh rates on both the document and the web part, but neither help.
    For a demo I want to show a single list field - nothing fancy.
    Possible to have dynamic data from an SPO List hosted in SPO?
    Any way to filter which row is sent from through a URL Query string?
    How?

    Hi ,
    Per the following article, the data sources will be disconnected and can't be refreshed after the Visio is published to SharePoint.
    "You can publish PivotDiagrams or Timeline diagrams to SharePoint, but they are disconnected from the data sources and can’t be refreshed."
    http://office.microsoft.com/en-001/visio-help/save-diagrams-to-sharepoint-HA102749359.aspx
    And also I would suggest you post in Office365 SharePoint online forum for a better assistance regarding this issue through the following link.
    http://community.office365.com/en-us/f/154.aspx
    Thanks,
    Daniel Yang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] 
    Daniel Yang
    TechNet Community Support

  • Develop Form and Workflow in SharePoint Online and On-Premise

    Hi Expert,
    I have the question about Form and Workflow in SharePoint Online vs ShrePoint On-Premise
    Current Problem : Customer is implemented Form and Workflow in SharePoint Online but they have a problem some features that didn’t work in SharePoint Online. I will have a meeting to discuss Do and Don’t Form and Workflow in SharePoint Online compare SharePoint
    On-Premise.
    Please suggestion.
    Thank you

    Hi MasterBird,
    There is no documentation to explain the difference of the custom form and workflow between SharePoint Online and SharePoint On-Premise. For your issue, you can have a look at the following blog:
    http://www.techrepublic.com/blog/the-enterprise-cloud/get-infopath-forms-and-sharepoint-online-with-office-365/
    https://support.office.com/en-us/article/Office-365-known-issues-6b380978-84ce-49af-be5d-f7cda0fe28f9?ui=en-US&rs=en-US&ad=US#__sharepoint_online_preview
    https://support.office.com/en-in/article/Configure-InfoPath-Forms-Services-a8609546-c0d7-4956-81b6-08e93eb4b290?ui=en-US&rs=en-IN&ad=IN
    http://blog.sharepointlearn.com/2011/11/03/sharepoint-in-office-365-the-good-the-bad-the-brilliant-and-the-ugly/
    Thanks,
    Eric
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Eric Tao
    TechNet Community Support

  • Creating Globally Reusable 2013 Workflows on SharePoint Designer 2013

    I'd like to create a workflow for a list in an application I downloaded from the Office store. The option I have is to create a globally reusable workflow which I can then use on the applications list. How can I create a globally reusable 2013 workflow,
    simply, what is the process of creating a globally reusable 2013 workflow on SharePoint designer 2013?

    Thanks Margriet, I'm actually using SPD 2013. When I select the "Workflows" node on SPD, I only get List Workflow, Reusable Workflow and Site Workflow options on the ribbon. I tried using Reusable Workflow but it doesn't create one that is "Globally Reusable".
    What I'm trying to do is to create a workflow which I can activate for a site collection so I can attache it to a list in an application I downloaded from Office Store. A reusable workflow such as the one I got from the Reusable Workflow option on the ribbon
    doesn't work.

  • What are the possibilities and limitation of using Out of the box content search webpart on SharePoint Online 2013/O365 ?

    Hi All,
    We are migrating from on-premise SharPoint 2010 to SharePoint online 2013.
    I have few questions below: 
    What are the possibilities and limitations of using Out of the box content search webpart?
    Also, how the cross site publishing will work in SharePoint online something with managed navigations and product catalog apporach? if it is not supported, then what are the alternatives to acheive the same?
    Appriciate any commnets/clarifications.Thanks in advance.
    Thanks,
    Dhananjay.

    Here are the possibilities of Content search webparts
    http://office.microsoft.com/en-in/office365-sharepoint-online-enterprise-help/configure-a-content-search-web-part-in-sharepoint-HA104119042.aspx
    http://office.microsoft.com/en-in/office365-sharepoint-online-enterprise-help/when-to-use-the-content-query-web-part-or-the-content-search-web-part-in-sharepoint-HA104206662.aspx
    Compare the strengths and limitations of the Web Parts
    It’s important that you understand the strengths and limitations of the two Web Parts because if you choose the wrong one, your site could run into performance problems. You can use both Web Parts to show content that is based on a query. In a simplified
    world, here’s how you can decide between the two:
    Use the CQWP when you have a limited amount of content, your query is simple, and you don’t expect your content to grow much in the future.
    Use the CSWP in all other scenarios when you want to show content that is based on a query.
    The table below gives a comparison of the two Web Parts:
    Web Part behavior
    Content Query Web Part
    Content Search Web Part
    Query configuration
    Easy
    You’ll need to know about certain search features such as
    managed properties.
    Query across large amounts of content
    Limited
    Yes
    Handle complex queries
    Limited
    Yes
    Scale to handle future content growth
    Limited
    Yes
    Display content from other site collections
    No
    Yes (see
    section below)
    Design of query results can be customized
    Yes, by using XSLT.
    Yes, by using HTML.
    Maintenance cost in a complex site architecture
    High
    Small (see
    section below)
    Narrow down the query results that are displayed in the Web Part
    No
    Yes, in combination with the
    Refinement Web Part.
    It was not there previously but then it was added to Office 365
    http://blogs.office.com/2013/10/29/search-innovations-for-site-and-portal-design-in-sharepoint-online/
    If this helped you resolve your issue, please mark it Answered

  • "Invalid text value" error when calling a web service from a workflow in SharePoint Online

    I'm trying to create a workflow that loops through a list in SharePoint Online using a REST web service call. However, I'm having
    some trouble trying to pass the authentication token as described in the following article.
    http://www.fabiangwilliams.com/2013/09/03/more-on-sharepoint-2013-r...
    Basically, the workflow stops right at the "Call web service" action, and the only error it tells me is the following.
    Invalid text value.
    A text field contains invalid data. Please check the value and try again
    Has anyone had success with web service calls to SharePoint Online?
    Dan Kreitz, Solutions Architect, Séafra Inc.

    Hi DanPoint,
    Thank you for your sharing!
    Best Regards,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • SharePoint online 2013 event receiver error

    I am currently working on a SharePoint online project. My code generates 6 documents in 6 different document libraries along with other metadata. When I save data to a List, the event receiver fires and creates all the 6 documents. But sometimes it stops creating
    the 6 documents and left with 1 or 2 documents. Sometimes documents has been created but without any metadata.
    The same code is working fine in my on-premises environment, but it sometimes breaks in the Office 365 environment. I also created a log list to track the issue as we cannot debug in Office 365. In the log list I found a error message saying "Thread was
    being aborted." Below is my code. please help it is happening only in Office 365 environment.
    namespace ExcelGen.ExcelGenReceiver
    using System;
    using Microsoft.SharePoint;
    /// <summary>
    /// List Item Events
    /// </summary>
    public class ExcelGenReceiver : SPItemEventReceiver
    /// <summary>
    /// The template URL
    /// </summary>
    private const string TemplateUrl = "/Quotation Analysis Electrical/Forms/Quotation Analysis Sheet ELEC_Blank.xlsm";
    /// <summary>
    /// The template url1
    /// </summary>
    private const string TemplateUrl1 = "/Quotation Analysis Mechanical/Forms/Quotation Analysis Sheet MECH_Blank.xlsm";
    /// <summary>
    /// The template url2
    /// </summary>
    private const string TemplateUrl2 = "/TenderSummaryLib/Forms/TenderSummaryBlankMaster1.xlsm";
    /// <summary>
    /// The RFI template URL
    /// </summary>
    private const string RfiTemplateUrl = "/EstimatingRFI/Forms/RFI Schedule MASTER.docx";
    /// <summary>
    /// The drawing template URL
    /// </summary>
    private const string DrawingTemplateUrl = "/Tender and Drawing Schedule/Forms/Tender Document Drawing Schedule.docx";
    /// <summary>
    /// The tender return template URL
    /// </summary>
    private const string TenderReturnTemplateUrl = "/Est_Tender_Pricing_Document/Forms/Tender Pricing Document blank.xlsm";
    /// <summary>
    /// The project number
    /// </summary>
    private string projectNumber = string.Empty;
    /// <summary>
    /// The project name
    /// </summary>
    private string projectName = string.Empty;
    /// <summary>
    /// The no bid
    /// </summary>
    private string noBid;
    /// <summary>
    /// The team
    /// </summary>
    private string team;
    /// <summary>
    /// The description
    /// </summary>
    private string description;
    /// <summary>
    /// The status
    /// </summary>
    private string status;
    /// <summary>
    /// The electrical
    /// </summary>
    private SPUser electrical;
    /// <summary>
    /// The mechanical
    /// </summary>
    private SPUser mechanical;
    /// <summary>
    /// The document date
    /// </summary>
    private DateTime? docDate;
    /// <summary>
    /// The tender received
    /// </summary>
    private DateTime? tenderReceived;
    /// <summary>
    /// The tender return
    /// </summary>
    private DateTime? tenderReturn;
    /// <summary>
    /// The pre construction program start date
    /// </summary>
    private DateTime? preConstructionProgramStart;
    /// <summary>
    /// The pre construction program end date
    /// </summary>
    private DateTime? preConstructionProgramEnd;
    /// <summary>
    /// The sector
    /// </summary>
    private string sector;
    /// <summary>
    /// The design build
    /// </summary>
    private string designBuild;
    /// <summary>
    /// The build type
    /// </summary>
    private string buildType;
    /// <summary>
    /// The service program start date
    /// </summary>
    private DateTime? serviceProgramStart;
    /// <summary>
    /// The service program completion date
    /// </summary>
    private DateTime? serviceProgramCompletion;
    /// <summary>
    /// The client1
    /// </summary>
    private string client1;
    /// <summary>
    /// The client2
    /// </summary>
    private string client2;
    /// <summary>
    /// The client3
    /// </summary>
    private string client3;
    /// <summary>
    /// The client4
    /// </summary>
    private string client4;
    /// <summary>
    /// The consultant
    /// </summary>
    private string consultant;
    /// <summary>
    /// An item is being added.
    /// </summary>
    /// <param name="properties">The Item Event properties</param>
    public override void ItemAdded(SPItemEventProperties properties)
    //this.EventFiringEnabled = false;
    var web = properties.Web;
    var listItem = properties.ListItem;
    try
    LogIssue(web, null, "Item Added", "List Item Id {0}", listItem.ID);
    if (!this.AttemptCopyProcess(listItem))
    LogIssue(web, null, "List Id : " + listItem.ID, "AttemptCopyProcess failed.");
    catch (Exception ex)
    LogIssue(web, ex, "List Id : " + listItem.ID, "AttemptCopyProcess failed.");
    finally
    //this.EventFiringEnabled = true;
    LogIssue(web, null, "List Id : " + listItem.ID, "Event Receiver completed sucessfully.");
    /// <summary>
    /// Logs any issues found
    /// </summary>
    /// <param name="webContext">The web context.</param>
    /// <param name="exception">The exception, if null not exception details are written</param>
    /// <param name="contextId">The context identifier, a unique identifier that allows us to know where the call originated, i.e. a List and ListItem Id, or a Page Url</param>
    /// <param name="comment">The comment.</param>
    /// <param name="args">The arguments.</param>
    private static void LogIssue(SPWeb webContext, Exception exception, string contextId, string comment, params object[] args)
    //// if (webContext.AllProperties.ContainsKey("EnableLogging"))
    var list = webContext.Lists.TryGetList("ErrorIssues");
    if (list != null)
    var item = list.AddItem();
    item["Title"] = contextId;
    if (exception != null)
    item["Message"] = exception.Message;
    item["InnerException"] = exception.InnerException ?? (object)string.Empty;
    item["StackTrace"] = exception.StackTrace;
    if (!string.IsNullOrEmpty(comment))
    item["Comment"] = string.Format(comment, args);
    item.Update();
    /// <summary>
    /// Assigns the field.
    /// </summary>
    /// <param name="listItem">The list item.</param>
    /// <param name="fieldName">Name of the field.</param>
    /// <param name="contextId">The context identifier.</param>
    /// <returns>The fields string value if present, otherwise string.empty.</returns>
    private static string AssignField(SPListItem listItem, string fieldName, string contextId)
    var fieldValue = string.Empty;
    if (listItem.Fields.ContainsField(fieldName) && listItem[fieldName] != null)
    fieldValue = listItem[fieldName].ToString();
    else
    LogIssue(listItem.Web, null, contextId, string.Format("Field not available : {0}", fieldName));
    return fieldValue;
    /// <summary>
    /// Assigns the field as a DateTime
    /// </summary>
    /// <param name="listItem">The list item.</param>
    /// <param name="fieldName">Name of the field.</param>
    /// <param name="contextId">The context identifier.</param>
    /// <returns>Returns the date if found, otherwise returns DateTime.MinValue</returns>
    private static DateTime? AssignDateField(SPListItem listItem, string fieldName, string contextId)
    DateTime? fieldValue = null;
    if (listItem.Fields.ContainsField(fieldName) && listItem[fieldName] != null)
    fieldValue = Convert.ToDateTime(listItem[fieldName].ToString());
    else
    LogIssue(listItem.Web, null, contextId, string.Format("Field not available : {0}", fieldName));
    return fieldValue;
    /// <summary>
    /// Creates the folder.
    /// </summary>
    /// <param name="listdoc">The list.</param>
    /// <param name="folderName">Name of the folder.</param>
    private static void CreateFolder(SPList listdoc, string folderName)
    LogIssue(listdoc.ParentWeb, null, "List Id : " + listdoc.ID, "Creating folder {0} in {1}", folderName, listdoc.RootFolder.ServerRelativeUrl);
    // Updated by Indusnet
    SPListItem folder1 = listdoc.Items.Add(listdoc.RootFolder.ServerRelativeUrl, SPFileSystemObjectType.Folder);
    folder1["Name"] = folderName;
    folder1.Update();
    listdoc.Update();
    // End Updated
    /// <summary>
    /// Assigns the user field.
    /// </summary>
    /// <param name="listItem">The list item.</param>
    /// <param name="fieldName">Name of the field.</param>
    /// <param name="contextId">The context identifier.</param>
    /// <returns>Returns the user if found, otherwise null.</returns>
    private static SPUser AssignUserField(SPListItem listItem, string fieldName, string contextId)
    SPUser user = null;
    if (listItem.Fields.ContainsField(fieldName) && listItem[fieldName] != null)
    var userField = (SPFieldUser)listItem.Fields.GetField(fieldName);
    var fieldValue = (SPFieldUserValue)userField.GetFieldValue(listItem["electrical_proj_manager"].ToString());
    user = fieldValue.User;
    else
    LogIssue(listItem.Web, null, contextId, string.Format("Field not available : {0}", fieldName));
    return user;
    /// <summary>
    /// Attempts the copy process.
    /// </summary>
    /// <param name="listItem">The list item.</param>
    /// <returns>True if it successfully processed, false otherwise.</returns>
    private bool AttemptCopyProcess(SPListItem listItem)
    if (listItem.ParentList.Title != "Enquiry_Template")
    LogIssue(listItem.Web, null, "List Id : " + listItem.ID, "ListItem titles is not Enquiry_Template, aborting.");
    return false;
    var finalNum = "15-" + new Random().Next(0, 9999).ToString("D4");
    this.Initialize(listItem, finalNum);
    if (this.noBid != "Yes")
    LogIssue(listItem.Web, null, "List Id : " + listItem.ID, "The noBid field does not equal Yes, aborting.");
    return false;
    this.CopyFiles(listItem.Web, finalNum);
    this.CreateFolders(listItem.Web);
    return true;
    /// <summary>
    /// Copies the files.
    /// </summary>
    /// <param name="web">The web.</param>
    /// <param name="finalNum">The final number.</param>
    private void CopyFiles(SPWeb web, string finalNum)
    LogIssue(web, null, "Web Id : " + web.ID, "Setting the copying of files ...");
    var mechanicalQuoteList = web.Lists["Quotation Analysis Mechanical"];
    var electricalQuoteList = web.Lists["Quotation Analysis Electrical"];
    var tenderSummarList = web.Lists["TenderSummaryLib"];
    var estimatingList = web.Lists["EstimatingRFI"];
    var tenderSheduleList = web.Lists["Tender and Drawing Schedule"];
    var tenderPricingList = web.Lists["Est_Tender_Pricing_Document"];
    var url1 = mechanicalQuoteList.RootFolder.ServerRelativeUrl;
    var url = electricalQuoteList.RootFolder.ServerRelativeUrl;
    var url2 = tenderSummarList.RootFolder.ServerRelativeUrl;
    var urlA = estimatingList.RootFolder.ServerRelativeUrl;
    var urlB = tenderSheduleList.RootFolder.ServerRelativeUrl;
    var urlC = tenderPricingList.RootFolder.ServerRelativeUrl;
    var foldername1 = string.Empty;
    var foldername = string.Empty;
    var foldername2 = string.Empty;
    var foldernameA = string.Empty;
    var foldernameB = string.Empty;
    var foldernameC = string.Empty;
    var folder1 = web.Folders[url1 + "/" + foldername1];
    var folder = web.Folders[url + "/" + foldername];
    var folder2 = web.Folders[url2 + "/" + foldername2];
    var folderA = web.Folders[urlA + "/" + foldernameA];
    var folderB = web.Folders[urlB + "/" + foldernameB];
    var folderC = web.Folders[urlC + "/" + foldernameC];
    if (!folder1.Exists && !folder.Exists && !folder2.Exists && !folderA.Exists && !folderB.Exists && !folderC.Exists)
    var folders1 = web.GetFolder(url1).SubFolders;
    var folders = web.GetFolder(url).SubFolders;
    var folders2 = web.GetFolder(url2).SubFolders;
    var foldersA = web.GetFolder(urlA).SubFolders;
    var foldersB = web.GetFolder(urlB).SubFolders;
    var foldersC = web.GetFolder(urlC).SubFolders;
    folders1.Add(foldername1);
    folders.Add(foldername);
    folders2.Add(foldername2);
    foldersA.Add(foldernameA);
    foldersB.Add(foldernameB);
    foldersC.Add(foldernameC);
    var file1 = web.GetFile(web.Site.Url + TemplateUrl1);
    var file = web.GetFile(web.Site.Url + TemplateUrl);
    var file2 = web.GetFile(web.Site.Url + TemplateUrl2);
    var fileA = web.GetFile(web.Site.Url + RfiTemplateUrl);
    var fileB = web.GetFile(web.Site.Url + DrawingTemplateUrl);
    var fileC = web.GetFile(web.Site.Url + TenderReturnTemplateUrl);
    if (file1 != null && file != null && file2 != null && fileA != null && fileB != null && fileC != null)
    var fileName = string.Format("{0}/{1}{2}", folder1.ServerRelativeUrl, this.projectName, ".xlsm");
    LogIssue(web, null, "Web Id : " + web.ID, "Copying file 1 {0} to {1}...", file1.Name, fileName);
    var byteArray1 = file1.OpenBinary();
    var uploadedFile1 = folder1.Files.Add(fileName, byteArray1, true);
    LogIssue(web, null, "Web Id : " + web.ID, "File 1 Uploaded with new ID of {0}", uploadedFile1.Item.ID);
    this.EventFiringEnabled = false;
    var listitem1 = uploadedFile1.Item;
    listitem1["Name"] = this.projectName;
    listitem1["EnquiryNo"] = finalNum;
    listitem1["Project_Name"] = this.projectName;
    listitem1["Tender_Received"] = this.tenderReceived;
    listitem1["Tender_Return"] = this.tenderReturn;
    listitem1["Quotation_Analysis_Mech_Url"] = "https://my site url/Quotation%20Analysis%20Mechanical/Forms/DispForm.aspx?ID=" + listitem1.ID;
    listitem1.SystemUpdate(false);
    this.EventFiringEnabled = true;
    LogIssue(web, null, "Web Id : " + web.ID, "Copied file 1.");
    fileName = string.Format("{0}/{1}{2}", folder.ServerRelativeUrl, this.projectName, ".xlsm");
    LogIssue(web, null, "Web Id : " + web.ID, "Copying file 2 {0} to {1}...", file.Name, fileName);
    var byteArray = file.OpenBinary();
    var uploadedFile = folder.Files.Add(fileName, byteArray, true);
    LogIssue(web, null, "Web Id : " + web.ID, "File 2 Uploaded with new ID of {0}", uploadedFile.Item.ID);
    this.EventFiringEnabled = false;
    var listitem = uploadedFile.Item;
    listitem["Name"] = this.projectName;
    listitem["EnquiryNo"] = finalNum;
    listitem["Project_Name"] = this.projectName;
    listitem["Tender_Received"] = this.tenderReceived;
    listitem["Tender_Return"] = this.tenderReturn;
    listitem["Quotation_Analysis_Elec_Url"] = "https://my site url/Quotation%20Analysis%20Electrical/Forms/DispForm.aspx?ID=" + listitem.ID;
    listitem.SystemUpdate(false);
    this.EventFiringEnabled = true;
    LogIssue(web, null, "Web Id : " + web.ID, "Copied file 2.");
    fileName = string.Format("{0}/{1}{2}", folderA.ServerRelativeUrl, this.projectName, ".docx");
    LogIssue(web, null, "Web Id : " + web.ID, "Copying file 3 {0} to {1}...", fileA.Name, fileName);
    var byteArrayA = fileA.OpenBinary();
    var uploadedFileA = folderA.Files.Add(fileName, byteArrayA, true);
    LogIssue(web, null, "Web Id : " + web.ID, "File 3 Uploaded with new ID of {0}", uploadedFileA.Item.ID);
    this.EventFiringEnabled = false;
    var listitemA = uploadedFileA.Item;
    listitemA["Name"] = this.projectName;
    listitemA["EnquiryNo"] = finalNum;
    listitemA["Project_Name"] = this.projectName;
    listitemA["Date"] = this.docDate;
    listitemA["Description"] = this.description;
    listitemA["ProjectNo"] = this.projectNumber;
    listitemA["RFIUrl"] = "https://my site url/EstimatingRFI/Forms/DispForm.aspx?ID=" + listitemA.ID;
    listitemA.SystemUpdate(false);
    this.EventFiringEnabled = true;
    LogIssue(web, null, "Web Id : " + web.ID, "Copied file 3.");
    fileName = string.Format("{0}/{1}{2}", folderB.ServerRelativeUrl, this.projectName, ".docx");
    LogIssue(web, null, "Web Id : " + web.ID, "Copying file 4 {0} to {1}...", fileB.Name, fileName);
    var byteArrayB = fileB.OpenBinary();
    var uploadedFileB = folderB.Files.Add(fileName, byteArrayB, true);
    LogIssue(web, null, "Web Id : " + web.ID, "File 4 Uploaded with new ID of {0}", uploadedFileB.Item.ID);
    this.EventFiringEnabled = false;
    var listitemB = uploadedFileB.Item;
    listitemB["Name"] = this.projectName;
    listitemB["EnquiryNo"] = finalNum;
    listitemB["Project_Name"] = this.projectName;
    listitemB["Date"] = this.docDate;
    listitemB["Description"] = this.description;
    listitemB["ProjectNo"] = this.projectNumber;
    listitemB["DrawingURL"] = "https://my site url/Tender%20and%20Drawing%20Schedule/Forms/DispForm.aspx?ID=" + listitemB.ID;
    listitemB.SystemUpdate(false);
    this.EventFiringEnabled = true;
    LogIssue(web, null, "Web Id : " + web.ID, "Copied file 4.");
    fileName = string.Format("{0}/{1}{2}", folderC.ServerRelativeUrl, this.projectName, ".xlsm");
    LogIssue(web, null, "Web Id : " + web.ID, "Copying file 5 {0} to {1}...", fileC.Name, fileName);
    var byteArrayC = fileC.OpenBinary();
    var uploadedFileC = folderC.Files.Add(fileName, byteArrayC, true);
    LogIssue(web, null, "Web Id : " + web.ID, "File 5 Uploaded with new ID of {0}", uploadedFileC.Item.ID);
    this.EventFiringEnabled = false;
    var listitemC = uploadedFileC.Item;
    listitemC["Name"] = this.projectName;
    listitemC["EnquiryNo"] = finalNum;
    listitemC["Project_Name"] = this.projectName;
    listitemC["Date"] = this.docDate;
    listitemC["Description"] = this.description;
    listitemC["ProjectNo"] = this.projectNumber;
    listitemC["PricingURL"] = "https://my site url/Est_Tender_Pricing_Document/Forms/DispForm.aspx?ID=" + listitemC.ID;
    listitemC.SystemUpdate(false);
    this.EventFiringEnabled = true;
    LogIssue(web, null, "Web Id : " + web.ID, "Copied file 5.");
    fileName = string.Format("{0}/{1}{2}", folder2.ServerRelativeUrl, this.projectName, ".xlsm");
    LogIssue(web, null, "Web Id : " + web.ID, "Copying file 5 {0} to {1}...", file2.Name, fileName);
    var byteArray2 = file2.OpenBinary();
    var uploadedFile2 = folder2.Files.Add(fileName, byteArray2, true);
    LogIssue(web, null, "Web Id : " + web.ID, "File 6 Uploaded with new ID of {0}", uploadedFile2.Item.ID);
    this.EventFiringEnabled = false;
    var listitem2 = uploadedFile2.Item;
    listitem2["Name"] = this.projectName;
    listitem2["EnquiryNo"] = finalNum;
    listitem2["Project_Name"] = this.projectName;
    listitem2["Date"] = this.docDate;
    listitem2["Team"] = this.team;
    listitem2["Estimator_Electrical"] = this.electrical;
    listitem2["Estimator_Mechanical"] = this.mechanical;
    listitem2["Status"] = this.status;
    listitem2["Tender_Received"] = this.tenderReceived;
    listitem2["Tender_Return"] = this.tenderReturn;
    listitem2["Sector"] = this.sector;
    listitem2["Design_Build"] = this.designBuild;
    listitem2["Build_Type"] = this.buildType;
    listitem2["Service_Prog_Start"] = this.serviceProgramStart;
    listitem2["Service_Prog_Completion"] = this.serviceProgramCompletion;
    listitem2["Client_1"] = this.client1;
    listitem2["Client_2"] = this.client2;
    listitem2["Client_3"] = this.client3;
    listitem2["Client_4"] = this.client4;
    listitem2["Consultant"] = this.consultant;
    listitem2["Pre-construction_Prog_Start"] = this.preConstructionProgramStart;
    listitem2["Pre-construction_Prog_End"] = this.preConstructionProgramEnd;
    listitem2["Tender_Summary_Url"] = "https://my site url/TenderSummaryLib/Forms/DispForm.aspx?ID=" + listitem2.ID;
    listitem2.SystemUpdate(false);
    this.EventFiringEnabled = true;
    LogIssue(web, null, "Web Id : " + web.ID, "Copied file 6.");
    /// <summary>
    /// Creates the folders.
    /// </summary>
    /// <param name="web">The web.</param>
    private void CreateFolders(SPWeb web)
    var projectListId = web.Lists.Add(this.projectName.Replace(' ', '_'), string.Empty, SPListTemplateType.DocumentLibrary);
    var projectList = web.Lists[projectListId];
    projectList.OnQuickLaunch = true; // The document library will appear in Quick Launch bar.
    CreateFolder(projectList, "1.Tender Documents");
    CreateFolder(projectList, "2. Electrical");
    CreateFolder(projectList, "3. Mechanical");
    CreateFolder(projectList, "4. Correspondance");
    CreateFolder(projectList, "5. Settlement Meeting Docs");
    CreateFolder(projectList, "6. Tender Return Docs");
    CreateFolder(projectList, "7. Tender Handover");
    projectList.Update();
    /// <summary>
    /// Initializes the specified list item.
    /// </summary>
    /// <param name="listItem">The list item.</param>
    /// <param name="finalNum">The final number.</param>
    private void Initialize(SPListItem listItem, string finalNum)
    var contextId = string.Format("List:{0}, Id:{1}", listItem.ParentList.Title, listItem.ID);
    this.noBid = AssignField(listItem, "Bid", contextId);
    this.projectName = AssignField(listItem, "Project_Name", contextId);
    var teamlookup = AssignField(listItem, "Team", contextId);
    var lookupParts = teamlookup.Split(new[] { ";#" }, StringSplitOptions.None);
    this.team = lookupParts[1];
    this.description = AssignField(listItem, "Description", contextId);
    this.status = AssignField(listItem, "enquiry_status", contextId);
    this.electrical = AssignUserField(listItem, "electrical_proj_manager", contextId);
    this.mechanical = AssignUserField(listItem, "mechanical_proj_manager", contextId);
    this.docDate = AssignDateField(listItem, "Date", contextId);
    this.tenderReceived = AssignDateField(listItem, "Tender_Received", contextId);
    this.tenderReturn = AssignDateField(listItem, "Tender_Return", contextId);
    this.preConstructionProgramStart = AssignDateField(listItem, "Pre-construction_Prog_Start", contextId);
    this.preConstructionProgramEnd = AssignDateField(listItem, "Pre-construction_Prog_End", contextId);
    this.sector = AssignField(listItem, "Sector", contextId);
    this.designBuild = AssignField(listItem, "Design_Build", contextId);
    this.buildType = AssignField(listItem, "Build_Type", contextId);
    this.serviceProgramStart = AssignDateField(listItem, "Service_Prog_Start", contextId);
    this.serviceProgramCompletion = AssignDateField(listItem, "Service_Prog_Completion", contextId);
    this.client1 = AssignField(listItem, "Client_1", contextId);
    this.client2 = AssignField(listItem, "Client_2", contextId);
    this.client3 = AssignField(listItem, "Client_3", contextId);
    this.client4 = AssignField(listItem, "Client_4", contextId);
    this.consultant = AssignField(listItem, "Consultant", contextId);
    if (this.status == "Won")
    this.projectNumber = string.Format("15-{0}-{1}", this.team, new Random().Next(0, 9999).ToString("D4"));
    if (this.status == "Active" || this.status == "Closed")
    this.projectNumber = "No Project No";
    listItem["ProjectNo"] = this.projectNumber;
    listItem["EnquiryNo"] = finalNum;
    listItem.Web.AllowUnsafeUpdates = true;
    listItem.SystemUpdate(false);

    Hi,
    In this forum we mainly discuss questions and feedbacks about Office client products, as your question is about SharePoint 2013, I suggest you post this thread in SharePoint forum:
    https://social.technet.microsoft.com/Forums/office/en-US/home?category=sharepoint
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Regards,
    Melon Chen
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs. Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Error while saving list workflow in sharepoint designer 2013

    Hi,
       I am trying to create custom workflow using sharepoint workflow 2013 at client side.While i am saving this,it thowas error-"Server side activities have been updated.you need to restart  sharepoint designer to use the updated version
    of activites"
    I have installed 32-bit sharepoint designer 2013 in my system and i have no access to server.
    I have also followed the solution  and deleted the contents in the below location.
    <user profile>\appdata\roaming\microsoft\SharePoint Designer\ProxyAssemblyCache
    <user profile>\appdata\local\microsoft\websitecache\<sitename>
    Please help to solve the error.
    Thank you

    You need to install updated version of SharePoint designer.
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/f255f4b4-1828-4ccb-983a-5efbf0e020ae/sharepoint-designer-2013-server-side-activties-have-been-updated-prompt?forum=sharepointcustomization
    Try below:
    http://stackoverflow.com/questions/19652391/error-while-saving-a-workflow-via-sharepoint-designer-server-side-activities-ha

  • How to convert word documents to html page in sharepoint online 2013

    Hi,
    I am new SharePoint and still learning it.
    I have been tasked to do the following on office 365 E3 SharePoint 2013 Online edition.
    1) I have to create a Web page in asp.net
    2) This page needs to show document from a given SharePoint folder and bind them in a grid or dropdown on the asp .net web page
    3) On selecting the document from the drop down or gird (on asp .net webpage), I need to show the SharePoint word document as HTML on the webpage (something like word to html) Note: These SharePoint word document may contain Images, bullets, tables etc. 
    What I have been able to do till now
    1) I have been able to connect to SharePoint from ASP .net application.
    2) I have been able to retrieve document from a specific SharePoint folder.
    3) Read the document from SharePoint folder and bind them to a drop down on the asp .net page.
    What is missing?
    I am not aware about any API that SharePoint Online provides to convert Word document to HTML. Any code sample or reference on how to will be much appreciated. 
    I am not also not sure what is the best way of achieving the functionality this?
    Thanks 
    Krishna

    If this was SharePoint server then it would be easy however in O365 You need to create a app which will use the word automation service and below is  powershell which you can use for the conversion:-
    # This script will convert Docx to PDF using word automation and similarly it can be used to convert to HTML
    $wordFile="http://contoso/kick.docx"
    $pdfFile="http://contoso/kick.pdf"
    $wasp = Get-SPServiceApplicationProxy | where { $_.TypeName -eq "Word Automation Services Proxy" }
    $site = Get-SPSite "http://contoso"
    $ConvertJob = New-Object Microsoft.Office.Word.Server.Conversions.SyncConverter($wasp)
    $ConvertJob.UserToken = $site.UserToken
    $ConvertJob.Settings.UpdateFields = $false
    $ConvertJob.Settings.OutputFormat = "PDF"
    $ConvertJob.Convert($wordFile, $pdfFile)

Maybe you are looking for

  • Questions in Custom Tag

    Hi, I have couple of questions in Custom Libraray Tags: 1) How I can from Tag Java file to open a new JSP window without the toolbars and determine the window size. 2) How I can read a JSP parameter from Tag Java file. For example I have a field call

  • Ariphmetical calcutations in SQL query...

    Hi there developers! Problem: How can i summerize data in two rifferent tables, for axample TableA has column named "quantity" and TableB has column named "quantity". In TableC i want to display the summery of TableA.quantity and TableB.quantity. Bes

  • Error when trying to create Single-node Server Pool

    We have an existing Oracle VM environment at our company that I have taken over support of. I would like to add a new Oracle VM server to the Manager, but I want it to be in it's own separate Server Pool by itself (no HA). When creating the Server Po

  • Color picker in Dreamweaver CC

    I just used the color picker in Dreamweaver CC for the first time. The preset swatches are gone. So how users are supposed to set colors now: remember a specific value and type it every time? (Save for 14 swatches that can be saved manually). I'm sur

  • Using Separator Bars in TOC

    I have a fairly complex help system, and I have 8 required workflow books, plus several other alternative workflow books. Based on a lot of internal user testing, users want to see their topics of interest in the TOC (topics I would not have thought