So: instead of publishing the form to the server (administrator approved publishing), send a question to your administrator to verify it and then wait till he/she uploaded it and deployed the solution and activated the feature on your site collection you can use the following commands:
Uninstall the existing solution (based on the from file name):
Uninstall-SPInfoPathFormTemplate -Identity Exampleform.xsn
Install the new solution (based on the from file name):
Install-SPInfoPathFormTemplate -Path C:\Form.xsn
Disable feature on site collection level
Disable-SPInfoPathFormTemplate -Identity "Form.xsn" -Site http://SPSite
Enable feature on site collection level
Enable-SPInfoPathFormTemplate -Identity "Form.xsn" -Site "http://SPSite"
Important note:
Make sure that you publish the xsn as follows:
- Open the backstage in infopath after creating the form and click Server SharePoint:
- Choose your site collection and click next
- Then Check that you must use the form throughout the browser and choose the last option (by administrator approved form) and click next
- Choose a location (on your local machine or network drive) where to publish the xsn (not to SharePoint location!! because you cannot enter a sharepoint path in the cmdlet in PowerShell).
- If you want to add columns to the sharepoint forms list or parameters, you can add them here from your InfoPath field list. Click next.
- Click publish and your xsn is published to your location. Now you can use the above PowerShell scripts to deploy the solution and activate the feature.
Werner and I did it again!!
Thanx for the credits ;o)
ReplyDelete