Hello SharePoint peeps,
I am hoping to solve an issue that senior management has with usability (lack of) in SharePoint (2013 in this case) when it comes to task approval emails and the painful approval process that follows. The current solution is to click open the task itself from email and guesstimate your way to the workflow approval step. This OOB approach is functional but not effective solution and lacks the charm that we all know SharePoint is hiding somewhere 🙂
I am aware of item view and item edit page URLs from SPD but is there a unique URL for each task that you can add to SharePoint Designer task email that directly takes you to approve page for that task (goal is- reduce clicks and guess for approval)? If we need to take this a step further with a one click approve from email itself, I appreciate any guidance. I hear some third party solutions also address this, I’m more curious about custom or OOB solution unless third party is absolutely required.
Thank You for your time!
Samir Raut
Hi, Samir.
In our situation all of the approvals are for InfoPath forms (they are all browser enabled forms). Â We actually create approval sections in the form. Â So instead of using a Collect Data from user step in the workflow, our workflows send out a notification email to the approving manager (at each stage of the process). Â Rules are used in the InfoPath form to control when the approval sections open. Â
The approvals are done in sequence, so when one approval is completed, the next section opens. Â I’ve attached a screenshot of one of our forms that has the in form approval. Â
The email that the workflow sends contains a link to the form, the manager clicks the link to the form, reviews the form data, scrolls down the approval section, selects the appropriate radio button (approved or rejected), adds comments if needed/desired, and clicks the submit approval button. Â The workflow then logs the outcome of this approval process to the workflow history. Â Once all approvals are acquired, the user who submitter the form receives at an email that the form has been approved. Â If at any stage of the approval process the form is rejected. Â The workflow is marked completed, the users gets an email that the form has been rejected and no further approvals are requested.
Laura Rogers has some excellent blog postings on how to do this. http://www.wonderlaura.com/Lists/Posts/Post.aspx?List=daba3a3b-c338-41d8-bf52-cd897d000cf3&ID=113&Web=dbb90e85-b54c-49f4-8e97-6d8258116ca
Hope this helps.
Glad to share, Samir. Â If you decide to try this and need assistance, just let me know. Â I’m finding for auditing purposes this is the best way to do the approvals as all of the approval data is with the form and can easily be archived. Â
What we’re looking at doing with our older forms is archiving to PDF for off-SQL storage. Â For the forms from our SP2007 environment, it means I also have to store the hidden workflow history lists so that I have the “proof” that the forms were approved.Â
Thanks, Craig. I should have clarified- in our case we are not using InfoPath for this list. That said, this is saved in the cool tricks toolbox for next time.
Thanks for taking the time to explain this, Robin. I have used conditional sections before but never thought about placing approval in the form. Will definitely keep this in mind when I use InfoPath next time.
After learning that SPD doesn’t give you access to Workflow Task ID during the Start Process Step by design, this meant that we can’t easily place link from workflow task email to the actual approval (editform) page. For that reason we had to explore other ways to save a click. Granted not the prettiest solution, here is the solution we have decided to use for now:
* Place a redirect on displayform.aspx page to route to editform.aspx for workflow task item
* Assumption: People don’t NEED to go to task item view page and will be ok to be routed to edit view if they absolutely have to
Here’s the snippet of JavaScript we added under a web part in the page:
function getParameterByName(name)Â
{Â
name = name.replace(/[\[]/, “\\\[“).replace(/[\]]/, “\\\]”);Â
var regexString = “[\\?& (file:///?&)]” + name + “=[^&#]*)”;Â
var regex = new RegExp(regexString);Â
var found = regex.exec(window.location.search);Â
if(found == null)Â
return “”;Â
else
return decodeURIComponent(found[1].replace(/\+/g, ” “));Â
}
var url = “https://oursite.net/sites/HR/Lists/Tasks/EditForm.aspx?ID=” ;Â
var ListItemId = getParameterByName(‘ID’);
url = url + ListItemId;
window.location.replace(url);
</script>
Thanks you all for guidance along the way
