Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advanced InfoPath Development InfoPath / SharePoint 2010 Prepared By: Suzanne George Sr. Architect Perficient - Microsoft.

Similar presentations


Presentation on theme: "Advanced InfoPath Development InfoPath / SharePoint 2010 Prepared By: Suzanne George Sr. Architect Perficient - Microsoft."— Presentation transcript:

1 Advanced InfoPath Development InfoPath / SharePoint 2010 Prepared By: Suzanne George Suzanne.George@perficient.com Sr. Architect Perficient - Microsoft West Region

2 Welcome! Restrooms – past the elevators to the left on the left hand side Electronic devices – please set to silent/vibrate More on our Microsoft Partnership @ http://www.perficient.com/Partners/Microsofthttp://www.perficient.com/Partners/Microsoft Our Microsoft blog @ http://blogs.perficient.com/microsofthttp://blogs.perficient.com/microsoft Visit Us Online: www.perficient.com Michael Ellis Director of Microsoft Solutions Michael.ellis@perficient.com (720) 946-2257 Suzanne George Senior Technical Architect Suzanne.george@perficient.com Twitter: spgenie Advanced InfoPath Development

3 About Perficient 3 Locations in 24 Cities in North America: Austin, Chicago, Cincinnati, Cleveland, Columbus, Dallas, Denver, Detroit, Fairfax, Houston, Indianapolis, Minneapolis, New Orleans, Philadelphia, San Jose, St. Louis (Operational HQ), Southern California, Toronto Offshore Development Centers in Europe and China + Recruiting Facility in Chennai, India Total headcount of 2000+

4 Top 5% of 33 Microsoft National Systems Integrators Gold Certified in 8 Competencies with 98% Customer Satisfaction rating 2012, 2010 Healthcare Provider Partner of the Year 2012 Cloud Partner of the Year, Northeast District 2011 SharePoint Best Practice Award, Southwest District 2010 Online Services Partner of the Year SharePoint Conference 2009 Multi-Solution Capability Award Winner 2006 - 2011 Best Customer Experience Award Nationally, regionally and industry managed Perficient receives priority support, early software previews, access to Microsoft Technology Centers for clients and ‘Gold’ level training Why Perficient? 4

5 Enter to win 5 Be sure to fill out one of the cards at your seat before the session is over to enter for a chance to win a copy of The SharePoint 2010 Handbook signed by co-author and today’s speaker Suzanne George, or a Microsoft Surface Device.

6 Agenda InfoPath – Getting started Designing foundations What you need to know Debugging InfoPath Creating a Vacation Request Form 6

7 InfoPath – Love it or Hate it!?! 7 The Promise of InfoPath The Developer Dream Why Me?? Where is the developer??

8 InfoPath - Start with the basics! To use or not to use InfoPath? Just because you can doesn’t mean you should! – Pros: Easy to use interface, integration with SharePoint Lists and Form Web Parts, Office Integration. Power Users can do simple stuff. Lookups and repeating tables are easy to do. – Cons: Advanced developers find it frustrating Can’t publish people picker fields Publishing columns / changes to column names No CSS type support (expand/collapse regions) evaluate the requirements and prioritization of features over simplicity and maintainability 8

9 Designing Your InfoPath Form for Success Design first! – Where is the data? Database, List or Library, in the form? – Where does the business logic belong – Workflow, Code-Behind, or InfoPath Rules? Where will approval happen? – Form Views – how many views will you need, when will they show, and who has access to update? – Form Controls – what types of controls are needed for the data, which controls will be exported, etc. – Styles – how will the form look and does it make sense to the user? 9

10 The InfoPath Need to Know List Deployment – Central Admin vs. Publish (Form Options) Know how to retrieve your InfoPath Form w/Powershell – Export-SPInfoPathAdministrationFiles -path d:\Temp\file.cab Know how to export source files before checking in to TFS. (Also possible to rename FormName.xsn to FormName.cab to view/extract contents) When removing exported columns, the are not removed from a list! Here is how to fix it… 10 Add-PSSnapin microsoft.SharePoint.PowerShell $web = Get-SPWeb http://crzo-test77/BASS $list = $web.Lists["ApplicationSupport"] $field = $list.Fields["SR Assigned To"] $field.AllowDeletion = “true” $field.Sealed = “false” $field.Delete() $list.Update() $list.Fields | Select-Object InternalName $web.Dispose()

11 Debugging an InfoPath Form Debugging Essentials – Check form with Design Checker – Set debug mode click the Build tab and then, at the bottom, click Advanced. In the Advanced Build Settings dialog box, click the Debug Info list and then click full In the Tools -> Options dialog box, in the area to the left, expand Debugging and then click General. Clear the Enable Just My Code (Managed only) check box. Select the Suppress JIT optimization on module load (Managed only) check box. Build/Deploy – Set Central Administration Logging for InfoPath Use ULS Viewer for log information Urls: http://ybbest.wordpress.com/2011/01/09/how-to-debug-infopath2010-using- vs2010/http://ybbest.wordpress.com/2011/01/09/how-to-debug-infopath2010-using- vs2010/ http://msdn.microsoft.com/en-us/library/gg271285.aspx#IP14_Debugging 11

12 An example… Vacation Form The requirements – User to input form – All data stays inside form, certain fields are exported to list – Version History – After approval start SharePoint workflow – SharePoint list views need to have People “is [Me]” functionality 12

13 InfoPath Advanced Code 13 How to refresh a data source from code behind Export all current InfoPath forms Install InfoPath form from powershell More powershell commands: http://technet.microsoft.com/en-us/library/ee906553.aspx http://technet.microsoft.com/en-us/library/ee906553.aspx Add-PSSnapin microsoft.SharePoint.PowerShell Export-SPInfoPathAdministrationFiles -path d:\file.cab string currentAccName = “domainName\\" + SPContext.Current.Web.CurrentUser.Name; // string currentAccName = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:CurrentUserAccountName", NamespaceManager).Value; DataSources["GetUserProfileByName"].CreateNavigator().SelectSingleNode("/dfs:myFields/dfs:queryField s/tns:GetUserProfileByName/tns:AccountName", NamespaceManager).SetValue(currentAccName); this.DataConnections["GetUserProfileByName"].Execute(); string querystr = "/dfs:myFields/dfs:dataFields/tns:GetUserProfileByNameResponse/tns:GetUserProfileByNameResult/tns: PropertyData/tns:Values/tns:ValueData/tns:Value"; XPathNodeIterator rows = DataSources["GetUserProfileByName"].CreateNavigator().Select(querystr, NamespaceManager); write-text "adding form solution: $solutionWsp to $defaultsiteurl" $formloc = ($installdir + "\" + $solutionWsp) Install-SPInfoPathFormTemplate -Path $formloc -Confirm:$false #wait for job to finish

14 InfoPath and SharePoint 2013 14 YAY!!! A real Visual Studio 2012 experience Not many feature changes How to Upgrade form (nope… not a double-click!) Prep your environment Relink references in code-behind Edit the Manifest.xml Look for hostname / portal names and replace. Update data connections Support Claims Look for old hostnames in data source files/connection files

15 Conclusion 15 Design first, code once! InfoPath can be powerful and leverage both PowerUsers and developers capabilities More things you can do with InfoPath Automatically check-in / out forms Populate dynamic approvers in form based upon information in the form Dynamically hide and show data Mash-ups Read/Write to database tables Questions?

16 Conclusion 16 Other blog posts… http://blogs.perficient.com/microsoft/2012/10/advanced-sharepoint-2010- infopath-development/http://blogs.perficient.com/microsoft/2012/10/advanced-sharepoint-2010- infopath-development/ http://blogs.perficient.com/microsoft/2013/03/infopath-and-sharepoint- 2013-upgrading-your-forms/http://blogs.perficient.com/microsoft/2013/03/infopath-and-sharepoint- 2013-upgrading-your-forms/

17 Suzanne George For further information, please contact: Suzanne George Suzanne.George@perficient.com Sr. Technical Architect Perficient - Microsoft West Region Twitter: spgenie Books co-authored: 17 The SharePoint 2010 Handbook: A Collection of Short Chapters for Delivering Successful SharePoint Projects Microsoft® SharePoint® 2010 Administrator's Companion


Download ppt "Advanced InfoPath Development InfoPath / SharePoint 2010 Prepared By: Suzanne George Sr. Architect Perficient - Microsoft."

Similar presentations


Ads by Google