Nov 16, 2017

Migrating InfoPath forms from SharePoint 2010 to Online

Introduction
InfoPath was never built for SharePoint to begin with - that's the fact that many people miss. It was retrofitted to support SharePoint so that forms solutions could be used on SharePoint
There are limitations inside InfoPath that could not have grown with the SharePoint trajectory. Because of that, Microsoft turned to researching a Web-based solution for the design and creation of forms in SharePoint or somewhere online instead of doing it on a desktop, which InfoPath does
How InfoPath forms are used in SharePoint 2010?
When you customize the SharePoint List/Library with InfoPath form then one of the following solutions is implemented:

1. Customizing the default SharePoint List template(customizing the new, edit & display forms/views) - forms connected with "Item Content Type". This can be connected with SharePoint Designer to automate business process with workflows - example: Send emails
2. Customizing the SharePoint Form Library where "Form Content Type" is used to store the forms. User will fill the form and submits the form back to the form library
3. Advanced solutions involves two types of implementations
i) Using data connections - data from Database, Web Service (.asmx / WCF services), XML, etc.
ii) Using custom code/sandbox solutions - writing custom codes for custom events using C#/VB scripts https://msdn.microsoft.com/en-us/library/office/ee526362.aspx
Problems/Issues/Known facts
1. There will be no InfoPath 2016, but InfoPath 2013 is filling that role.
SharePoint 2016 works with InfoPath 2013, which will be supported until 2026 as if it were part of Office 2016.
2. InfoPath 2013 is now available in the Microsoft Download Center.
3. Microsoft has provided guidance that the successor to InfoPath will be PowerApps, but with caveats: feature parity with InfoPath is not a goal, and InfoPath will still be preferred for some scenarios involving offline work and rich XML documents, for example.
4. Office 365 will support InfoPath browser forms in SharePoint Online ‘until further notice‘. There were indications that support might end one year after the release of Office 2016, but that date has now passed.
5. InfoPath browser forms with code do not work with the Managed Solutions Gallery (2013, 2016)6. InfoPath browser forms with code do not work on SharePoint Online. Reference: Removing Code-Based Sandbox Solutions in SharePoint Online
7. InfoPath browser forms do not work on mobile devices when SharePoint Online mobile view is enabled.
8. There are reports of problems using InfoPath 2013 with Outlook 2016 email.
9. Microsoft's Forms Preview is determined not to be InfoPath replacement
Reference: https://blog.formotus.com/enterprise-mobility/microsoft-announces-future-infopath
10. InfoPath form in SharePoint Online doesn’t support some web service data connection which are supported in SP 2010
This issue occurs because loopback protection is enabled in the SharePoint Online environment. Loopback protection must be disabled for InfoPath forms to be able to connect to a SharePoint Online web service. This works only when loopback protection is disabled. For security reasons, loopback protection is always enabled in SharePoint Online. This is a known limitation of InfoPath forms in the Office 365 SharePoint Online. But as confirmed by Microsoft. it is not possible to disable it due to security issue.
Error message when you connect an InfoPath form to a SharePoint Online web service: "An error occurred while connecting to a Web Service"
Only the following web services are supported:
 lists.asmx
  CheckOutFile
  CheckInFile
 usergroup.asmx   GetUserCollectionFromGroup
  GetUserCollectionFromSite
  GetGroupCollectionFromWeb
 UserProfileService.asmx  GetUserProfileByName  (If you are using User Profile Service connections and classic authentication?  You might have to update rules/formatting to handle the claims usernames now that are standard in 2013/Online)
  GetUserPropertyByAccountName
  GetCommonManager
  GetUserMemberships
  GetCommonMemberships
References: Microsoft on the Future of InfoPath
InfoPath 2010 features unavailable in Web browser forms
Microsoft's next steps/strategy
1. InfoPath 2013 will remain the latest version and no more new versions will be released
2. The guidance (from Microsoft) is that InfoPath will still be supported through 2026, which is a long time in terms of software technology.
Support

Reference: https://blogs.office.com/en-us/2016/01/20/sharepoint-server-2016-and-project-server-2016-release-candidate-available/
3. Microsoft is going to deprecate SharePoint Designer, too, which I understand is used to build sites, workflows, create themes, page layouts and many other uses.
4. Microsoft's answer is that SharePoint Designer 2013 will work with SharePoint Server 2016, just like InfoPath 2013 will work with SharePoint Server 2016. This is good for SharePoint On-Premise users

5. For SharePoint Online (Office 365), Microsoft's answers are:
Microsoft Power Apps in place of InfoPath forms (Power Apps not a complete replacement/alternative to InfoPath forms but still this is an option available now)
Microsoft Flow in place of SharePoint Designer for workflows
The above features/additions are made keeping Cloud first and Mobile first strategy in the mind

Other Considerations
There are a couple things to think about when you’re complete. 
1. You’ve changed the version of SharePoint. If you’re upgrading say from Office 2010 to Office 2013 and InfoPath 2013 has some changes from 2010 to think about
2. Check all your data connections and ensure they work
Hopefully this allowed you to migrate a complex InfoPath list form from SharePoint 2010 to SharePoint 2013/Online with relative ease.
Happy Share(ing)Point! 

Nov 3, 2017

We can't do that for you because the file is no longer checked out or has been deleted

This error is an interesting scenario but so weird one which I faced recently while migrating SharePoint 2010 designer workflows to SharePoint Online.
Post migration, when I try to edit the workflow in designer I got the below error:

It clearly shows some configuration files are missing.
Hence I have navigated to All Files (from SharePoint Designer 2013) -> Workflows folder -> Workflow -> noticed only one file is migrated but other configuration XOML, XSD or XML files are missing.Now, logged in to the designer with the account which I migrated and found all these required files are Checked Out. When I try to check in the file then I get this error:
It is so confusing that you are not able to Check In the file even when you are SCA or have full control over the site or even if you have created the workflow.
After hours of confusion, finally found the file has having wrong file name or characters which SharePoint Online(Office 365) does not support. But this name format is supported in SharePoint 2010 version. Screenshot for reference.
Issue Fix:

Navigate to Workflows folder -> select the workflow name -> Right Click on the file -> Properties -> Remove the forward slash '/' -> Save -> Check in the file :)
Now, you should be able to edit the workflow in designer, save / publish it with no issues.
Thought this is worth sharing so that it saves someone's time!