InfoPath Update Fails – This May be the Hack You’re Looking For.

I have a SharePoint 2010 list with a custom InfoPath list form. Recently I needed to add a couple new fields to the list and thus update the form. 

  • Unfortunately #1) This is a simple task, so if something goes wrong, you won’t find much help out there.
  • Unfortunately #2) Something went wrong.

I found that  when I tried to republish my form, I received an InfoPath error dialog “The SOAP message cannot be parsed.”  In fact, I found that if I just opened and, making no changes, published the form, it would also fail.

image

Not useful. So I fired up Fiddler in hopes I would be able to get a little more information about the error.

image

You can see above that my client is actually not receiving an HTTP error. Instead I’m receiving an error page, and a quick look at the url for that page shows that the actual problem is a timeout (/_layouts/error.aspx?ErrorText=Request%20timed%20out)

image

Inspecting the payload shows that this is the branded SharePoint error page.from the error page shows that the actual problem is a timeout issue.

#HeadSmack: Only now as I’m writing this up does it dawn on me that because the above response is the standard error page, I probably could have dug into the HTML there and pulled out the correlation ID and then traced the issue into the logs for more information.

Normally, you’d go to the logs for something like this, but in this instance, I don’t have direct access to the logs and without a correlation ID getting any info back is difficult. Instead I go to Bing I do find a few references to how this timeout duration can be changed on the farm.  However, this form is already in place and I can’t even republish the same version.  It didn’t feel right that I should need to change farm settings to correct the issue.

As far as I know, none of the form’s xml gets stored in with the actual list item. Still there were 2499 items in the list now, which is way more than there were when this form was originally created.  If maybe the system took some action, be it validation or update, to each list item when the form was updated, a timeout would seem plausible.  On a hunch I decided to try reducing the number of items in the list.

image

Starting with the items with the oldest modified dates, I began deleting them 100 at a time. With the intent on recovering them from the recycle bin if all goes well.

image

About 1000 items into the process my error message changed, which felt promising.

image

 

image

Then at the magic number of 1199: Success! WTF??! Oh well, I’ll take it.

image

So I made all of my updates, and republished the form. I then went back into the recycle bin and restored all the deleted items.

image

 

image

All the items came back fine without so much as an altered modified date. (It’s 2013 now. Those dates are a year ago. I’ll admit the coincidence of the timing did cause me a split second of panic.)

I don’t know why it should matter how many items are in the list and this is a hacky workaround, but in a pinch or with a reluctant admin, this may be the hack you’re looking for.

SharePoint, SharePoint, Why Have You Forsaken Me?

SharePoint has forsaken me, at least that’s what it feels like every 3 years or so when they release a new version. When it went from STS to WSS 2 it was “What, I can’t use the SQL DB directly any more?” Then came SP 2007 and, “What, I can’t make post release updates to my Site Definitions?” SP 2010: “I can’t develop on with Virtual PC anymore?”

Am I ranting here? Nope. I love it. I’ve been a SharePoint developer a long while now and each time I begin to get a little bored with the job, Microsoft introduces a new version of the product that upends the community. There are always new, exciting features and ‘features’ to learn, many of which are improvements Winking smile .

Now SP 2013 is here and it’s awesome, so what’s moved my cheese this time around? Apps for SharePoint. I explained earlier why I think SharePoint Apps are critical and why I think they’ve killed Farm and Sandbox solutions (RIP SharePoint Features 2007-2010). So now I’m trying to create an SharePoint App for a common business scenario and I’m finding myself stuck rather early in the process.

I want to create a list template and deploy it as a SharePoint App. I want to be able to roll up content from multiple instances of my list, so all instances of my list must use a common content type. Creating a SharePoint App that includes my site columns, content type, list definition, and list instance is pretty straight forward, but here’s the big catch: I want instances of my list to live in right in the user’s site so the user can interact with it just like the OOTB lists they’ve added, including creating lookup fields.  SharePoint Apps run in the application infrastructure, which is a separate site collection from the user’s site. Using all the simple methods in Visual Studio (Add Item) leaves a barrier between the user’s site and my list instance. 

My current line of thinking is that in order to create my list instance in the user’s site, I need use javascript to create my resources inside the host site.  I’ve been able to successfully create my site columns in the host site using JSOM.  However, creating the content type there has got me stumped. I’ve been able to get back my collection of content types from the host web, but I can’t seem to add to it.

SharePoint, SharePoint, why have you forsaken me? You’ve improved column, content type, and list creation in Sandboxed solutions, but these are not compatible with your App Model. You’ve given me a robust new object model for javascript, but left most of the API documentation blank.

If When I figure this all out, I’ll turn it into a few step by step articles and maybe publish the final product to the store.

Oh, and Happy New Year!

RIP SharePoint Features 2007 – 2010.

I know: Farm and Sandbox features still exist in SP 2013 (with improvements even) but they aren’t compatible with the SharePoint App Store, and the SP App store is the future, my friends.

You say, “But Ryan, you buffoon, what makes the app store so critical in the on premise future that the next few years surely holds?”

To which I reply, “While over the next several years, the major percentage of SharePoint deployments will likely be on premise, the impact of Office 365 on development will be revolutionary. In fact, despite its low percentage of installs, I believe Office 365 has already hit critical mass and the SharePoint App Store is now a self fulfilling prophesy.” I’d say it just like that too, because I’m a tool.

1) Many Companies will demand their solutions be deployed as SharePoint Apps.  With this iteration product complexity and the difficulty in finding great SharePoint Admin talent will begin pushing some companies to Office 365.  However, the larger impact will come from the many on premise installations where admins will be looking to Office 365 as their model for deploying solutions internally while safeguarding their environments against rogue code. I predict massive rewriting of governance policies to encourage SharePoint apps and discourage old school Farm-Deployed solutions.

2) Nearly all third party SP vendors will be creating Office 365 App Store compatible versions of their products. It gets them access to customers on Office 365, and it gets them the path of least resistance into all those on premise installations that follow the Office 365 model; and it does so using a single code base to maintain.

3) Any of those on premise companies that thought they’d be ignoring the App Store, will be forced to pay attention when they inevitably need to deploy one of these third party solutions.

4) Developers will prefer to write Office 365 compatible Apps, not because they’re easier or better (the juries still out on that), but because it exposes them into the most markets with the most code reusability.

5) As companies see more and more SP Apps in the store, they will begin looking first to the for solutions.

6) To remain relevant, SharePoint solutions must be written and deployed as SharePoint Store Apps

And that is how Features die.

RIP SharePoint Features 2007 – 2010.

VS 2012 Update for SP Developers

Nice! I just got this email from MSDN. A couple of exciting things in here. 1) MS is holding true to pushing out more regular updates to VS. 2)Better support for ALM and Load testing SharePoint code (I’m assuming this is targeted to SP 2013, and not backwards compatible with SP 2010)

Grab the update here: http://www.microsoft.com/visualstudio/eng/downloads#d-visual-studio-2012-update

“Dear Ryan,
We’re excited to announce that Visual Studio 2012 Update 1 is available today! Updates provide continuous value, adding new capabilities year-round to Visual Studio 2012. These releases are aligned with the core software development trends in the market, ensuring you always have access to the best solution for building modern applications. In addition, the update process makes it easier for you to locate and deploy bug fixes, and keep the client up-to-date with regard to our hosted cloud offerings.
The key features available with this update include1:

  • SharePoint development: additional ALM capabilities in SharePoint – such as Load Testing and Coded UI testing support – improving quality, scalability and agility.
  • Agile team support: easier agile planning with Web Access and new Kanban support, alongside existing Scrum support.
  • Continuously enabling quality: improvements for testing, from organizing unit tests to more flexible workflow for manual test execution.
  • Windows development: improved Windows 8 application development, such as support for debugging mixed managed and native Windows Store Applications and improved ARM debugging for Windows 8 apps.”