Wednesday, May 21, 2014

InfoPath: The security validation for this page is invalid.

Hi guys

The error message in the title can quite often be a real head scratcher, but the very good news is that it is quite easy to get rid of. It happens when your InfoPath browser form executes custom code that calls directly into the SharePoint object model and specifically when you try to update the underlying SQL databases (i.e. when writing to s SharePoint list).

In your custom code, please make sure that you set SPWeb.AllowUnsafeUpdates to true before your code that updates the database. In addition, please set this value to false again afterwards to comply with best pratices.

Happy coding!

Hermann


Quick easy way to copy multiple files from a SharePoint list/library

Morning my dear readers

Here's a real quick easy way to copy multiple files from a SharePoint list/library. When you open a list or library, in the list/library tab, find the 'Open with Explorer' option in the ribbon. When you click on it, the list/library will (wait for it)....open with explorer! Be aware that it might take some time especially if it is a large list/library. From there on then you can go nuts and copy/paste as you normally would.

Hope this helps someone out at some point!

Happy days!

Hermann