Unknown's avatar

Posts by Simon Doy

I am an avid SharePoint enthusiast who works as an Independent SharePoint Consultant based in Leeds, United Kingdom. I am one of the organisers of the Yorkshire SharePoint User Group in the United Kingdom. I have been designing and building SharePoint solutions since 2006.

>SharePoint Workflow InfoPath Forms: SchemaValidationException, Exception Message: Schema validation found non-datatype errors.


>Whenever I start developing SharePoint workflows there are always a couple of gotchas that get me. Unfortunately or should that be fortunately it is generally different things each time.

The current workflow that I am developing for a client is using Association and Initialisation Forms. Getting the association form to work took a couple of attempts, the major one being that each time I updated the solution, the forms themselves were not being updated which kinda didnt help as I was trying allsorts of things to solve it. Once the solution was deleted and readded in then the form started work.

“Great I thought” and then I actually tried to start a workflow and the dreaded Form has closed message quickly appeared.

Fortunately on a quick investigation of the ULS logs (c:\program files\common files\microsoft shared\web server extensions\12\logs) there was an entry from the Form Server Runtime. Which stated that the form could not be open successfully due to the following:-

SchemaValidationException, Exception Message: Schema validation found
non-datatype errors.

Looking around on the web there wasn’t too much however I did find a post by Scot Hillier on creating a workflow with such forms. This pointed me to something that I wasn’t do and this is using Association Data. When you create an InfoPath project then a sampledata.xml file is created which gives a – yes you guessed it – a xml file with the sample default data from your form.

Using this I created an entry within workflow.xml called AssociationData. Using the sampledata.xml copy over the xml in between the AssociationData tags.

Redeploying the solution refreshed the InfoPath forms but the Initialisation form still failed to load.

Looking at the form schemas I realised that maybe it was due to the difference in the forms schemas. I updated each of the elements, each time there was no difference until finally I updated the root element schema name so that they are the same.

This solved the problem, on top of that it meant that I now only needed one serialization class to read the forms xml data! If you don’t know what I am talking about then please take a look at this MSDN post.

Happy coding.

>Page Layout and Master Page not updating


>Recently we have been redesigning one of our clients home pages. This is a minor release whilst we get a design house on board. The idea however is for the clients site to keep evolving while they find a design agency that they like.

Anyway the homepage has been deployed as a custom content type which is deployed via solution/feature framework.  I do plan to document what we did on here at some point.
Whilst this deploys beautifully we had to make a couple of tweaks to the layout after deployment and this brought a problem.
We’d update the master page layout template but the homepage would not update! So after a bit of playing about we realised that the page was not properly connected to the master page layout.
Using SharePoint Designer, I opened up the site, browsed the sites /Pages document library. Found the offending page, right-clicked on the page disconnected it from its page layout. A warning appeared and clicked Yes. SharePoint Designer worked away and then another right-click and reconnected it to the page layout.
Switching back to the Home page and refreshing the page revealed that it was now working correctly and the master page layout changes were now reflected onto the home page, job done!