THE PROBLEM
You have on premise SharePoint 2013 farm and you are utilizing InfoPath forms for many different purposes. Some of these forms require approval and trigger an approval workflow which kicks out an email to end users. This is no problem on desktops and laptops with Outlook while in office or connected via VPN. The problem is with end users who are often on the go and would like to review and approve forms on their mobile devices such as IPhones/IPads and Androids.
Side Problems:
- We need to convert specific links to FQDN links to ensure its accessible from the outside.
- We need to force InfoPath forms to open in browser.
- We need to force SharePoint to open in PC View.
THE SOLUTION
Prior to proceeding, I have created a simple Approval Workflow in SharePoint 2010 workflow format and specified my approves. In case of some InfoPath forms, approves are added on the fly when filling out a form,
InfoPath Forms Library Site Location: http://demo/subsite
Prior to proceeding, I have created a simple Approval Workflow in SharePoint 2010 workflow format and specified my approves. In case of some InfoPath forms, approves are added on the fly when filling out a form,
InfoPath Forms Library Site Location: http://demo/subsite
- Edit the Approval Workflow in SharePoint Designer 2013
- Click on Change the behavior of a single task
- Click on Local Variables and create two variables.
- fqdnURL with type of String
- InfoPathMobileFQDN with type of String.
- Under When a Task is Pending window.
- Click on Action button in the ribbon.
- Select Extract Substring from Index of String. Had to do this in order to get part of the task URL that is needed later in the workflow to change the link to FQDN.
- Click on string and set it to Current Task:Form_URN
- It will output to Variable: substring2
- Click on Action button in the ribbon.
- Select Set Workflow Variable.
- Click on workflow variable and set it to Variable:fqdnURL.
- Click on value and set it to the site fully qualified domain name url, in my case its http://demo.whateverdomain.com/subsite
- Click on Action button in the ribbon.
- Select Set Workflow Variable.
- Click on workflow variable and set it to Variable:InfoPathMobileFQDN.
- Click on value and set it to the site fully qualified domain name url used to open InfoPath form in browser, in my case its: "http://demo.whateverdomain.com/subsite/_layouts/15/FormServer.aspx?XmlLocation=/subite/[%TaskProcess:Item_URL%]&ClientInstalled=false&DefaultItemOpen=1"
- In red above please insert your own information.
- Should look like the following:
- Click on ...then Email task notification to Current Task: Assigned_To, number 4 in the above image.
- Highlight and edit link after the Review word in line #1, and set it to:
- Text to display: [%Task Process:Item_Title%]
- Address: set it to variable InfoPathMobileFQDN.
- Add If you don't see Open this task button, please click here text to the like line #3.
- Highlight the If you don't see Open this task button, please click here text and click on Edit HyperlLink button and set it to:
- Text to display: please click here
- Address: [%Variable: fqdnURL%]/[%Variable: substring2%]&OpenIn=Browser&Mobile=0
- Should look like the following:
- The added link in the line #3 in the screenshot above is to accommodate Non-Outlook users such as when checking webmail or using mobile devices.
- Click OK and save and publish your workflow.
- Start a workflow with yourself and try it out on your mobile device.
NOTE: Please note that you will need to do this on few other places within this particular workflow and if you have more then one approval workflow, you will need to do this on every single one of them. There are also considerations such as if you are using UAG or some other method to publish your on premise SharePoint so that its accessible to the outside world.
This is a very first try and I plan to tweak it here and there using variables to reduce amount of typing the URLs and so on. Long story short, Approval workflows can be accessed and approved via mobile devices with few modifications mentioned above. I hope this helps someone.
Keep in mind, you are using the above on your own risk.
No comments:
Post a Comment