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
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
