SharePoint 2013 task approval form redirect to EditFrom from DispFrom

One Click Approval for SharePoint 2013 Tasks:


  1. 1. Open the task list in SharePoint Designer and create a new List Form
  2. 2. In the Create New List Form window, set the Filename as “RedirectToEditForm”, the type as Display, and check “Set as the default for the selected type”. Also pick your Workflow Task content type.
  3. 3. Open the Form in Designer so that the code is displayed, then click the “Advanced Mode” button in the ribbon bar. This will open the entire page for edits.
  4. 4. Insert the following javascript directly after the line <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"> (this is around line 15)
    ?
    1
    2
    3
    4
    5
    6
    7
    <script type="text/javascript">
        <!--
        var origUrl = window.location.toString();
        var editUrl = origUrl.replace("RedirectToEditForm","EditForm");
        window.location = editUrl;
        //-->
    </script>
  5. 5. Save the form, accepting the change from the site definition.

Comments

Popular posts from this blog

Clearing the Configuration Cache for SharePoint

SharePoint 2013 REST API CRUD Operations

Add List Item Attachments to Task Form using Nintex Workflow and Forms