jQuery Library for SharePoint Web Services (SPServices) v0.5.6 Released

1 minute read

Tonight I’m releasing SPServices v0.5.6.  The changes in this release aren’t major, but they are still important.

Jaap Vossers (that’s a link to Jaap’s SharePointOverflow profile because his blog seems to have gone missing as I write this) spotted a bug in the core SPServices function that I hadn’t ever caught.  If he supplied a WebURL value for the root site in the Site Collection simply as a slash (“/”), there was an error and the Web Services calls failed.  I’ve fixed that bug and made my determination of the right site URL in ajaxURL a bit smarter, handling a trailing slash (or lack thereof) more gracefully.

Jaap also requested an enhancement to UpdateListItems.  Back when I first created SPServices, I added a little shortcut syntax to UpdateListItems so that you could simply supply an item ID and an array of valuePairs to update a list item, rather than constructing the full batch parameter yourself.  Jaap’s suggestion was to extend that capability a little to make it just as easy to create a new list item.  So now if you set the batchCmd option to “New”, you can use the valuePairs shortcut as well.  (If you mistakenly pass an item ID, it will be ignored.)

Finally, a couple other bugs.  When I built SPAutocomplete (which is a relatively recent function that I don’t think is getting the attention it deserves), I left out the WebURL option; now it’s there.  In SPCascadeDropdowns, I was constructing the attribute name which contained the most recent values with the DisplayName of the childColumn.  This caused errors in Firefox if there were spaces in the DisplayName.  (Surprisingly, IE just grinned and worked.) The attribute is now constructed appropriately with the StaticName.

As always, here’s a copy of the release notes from the Codeplex site.

New Functionality

Alpha Issue Tracker Item Function Operation Description
ALPHA3 6428 $().SPServices UpdateListItems Add valuePairs logic for Inserts in UpdateListItems

Bug Fixes and Efficiency

Alpha Issue Tracker Item Function Operation Description
ALPHA1 6426 $().SPServices All Web Service calls fail if webURL is set to “/” (Root Site)
ALPHA1 6427 $().SPServices.SPAutocomplete NA webURL not being passed from SPAutocomplete to GetListItems
ALPHA2 6487 $().SPServices.SPCascadeDropdowns NA SPCascadeDropdowns: Issue with spaces in the DisplayName for childColumn

Have a thought or opinion?