
On one of my recent projects, a client asked if it would be possible for the link to a task within a workflow notification email to open the task in “edit” mode instead of “display”. If you’re unfamiliar with SharePoint 2013 task processes built in SharePoint Designer, here’s what their process looked like prior to our change:
- Someone submits form
- Approval request sent to manager
- Manager clicks link in email to open task
- Manager clicks “Edit”
- Manager clicks “Approve”
They wanted to eliminate step 4 to make the process as easy as possible (one-click after opening link in email). Here’s what we ended up doing:
- Open your task list in SharePoint Designer by clicking “Lists and Libraries” from the left nav then “Workflow Tasks”
- Add a new form

- Update all fields to match below (name it “OneClick”, set as display type, set as default, set content type to Workflow Task)

- Click OK
- Right click your new form and select “Edit in Advanced Mode”

- Look around line 14 for the line beginning in <asp:Content ContentPlaceHolderId=”PlaceHolderMain”…

- Insert the following script after that line and “Save”
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type="text/javascript"> | |
| <!– | |
| var origUrl = window.location.toString(); | |
| var editUrl = origUrl.replace("OneClick","EditForm"); | |
| window.location = editUrl; | |
| //–> | |
| </script> |
Click OK for the warning about changing from the site definition
Now in your workflow task notifications whenever there’s a link or reference to the Task URL it will automatically open in “Edit” mode.
Leave a Reply