2 minute read
Today I’m releasing SPServices v0.7.1. If you are using an earlier version of SPServices, I strongly suggest that you upgrade to this version. Not only does it have some cool new stuff in it, I’ve managed to squeeze some considerable performance improvments out of some of the most used functions, like SPCascadeDropdowns and SPDisplayRelatedInfo. In my test environments, I see a noticeable improvement in both functions.
While v0.7.1 is only a point release and follows its sibling v0.7.0 quickly, it actually contains far more changes.
One of the cool new things is a new function called $().SPXmlToJson. I’ve gotten quite a few requests over the years for SPServices to output JSON rather than just XML. I’ve resisted to some degree because it wasn’t entirely clear how many people might use it. As jQuery has become a more and more common part of the SharePoint development toolset, it seemed to finally make sense to add it in. Keep in mind that I can’t ask SharePoint for JSON from the SOAP Web Services; they return XML. What SPXmlToJson does is take that XML output and convert it into JSON. Of course that introduces some overhead, so use it wisely. This first implementation is firmly aimed at GetListItems, but it will also work with other “flat” XML. As folks express a need for enhancements to the function, I’ll try to work on them.
Another nice enhancement is to allow you to request that SPCascadeDropdowns and SPDisplayRelatedInfo perform their logic using the item IDs rather than the item values. The latter is more the approach that SharePoint uses in many cases, but the former is a far more robust and database-like approach.
I’ve also added in some of the missing Web Service operations that people have asked for, including Lists.ApplyContentTypeToList, Lists.CreateContentType, Lists.DeleteContentType, Lists.GetListItemChanges, Lists.UndoCheckOut, Lists.UpdateContentType, SiteData.GetWeb, SiteData.GetSite, and SiteData.GetSiteUrl.
There are numerous other performance improvements and some edge condition bugs I’ve managed to fix.
I’ll be updating the documentation over the next day or so. Keep in mind that the documentation always represents the capabilities of the current version.
Here are the details on some of what is included in this release; see all items in the Issue Tracker here.
|Alpha||Issue Tracker Item||Function||Operation||Description|
|ALPHA3-6||9755||$().SPXmlToJson||NA||Convert XML data to JSON|
|ALPHA11||9751||$().SPServices.SPDisplayRelatedInfo||NA||SPDisplayRelatedInfo Matching on ID Instead of Text|
|ALPHA11||633||$().SPServices.SPCascadeDropdowns||NA||SPCascadeDropdowns() – Using IDs on Query to populate child column rather than values|
ALPHA13 – Streamlined SPXmlToJson. This is RC1 for the new function.
|Alpha||Web Service||Operation||Options||MSDN Documentation||Issue Tracker Item|
|ALPHA1||Lists||GetVersionCollection||[WebURL], strlistID, strlistItemID, strFieldName||Lists.GetVersionCollection Method||8322|
ALPHA12 Lists.ApplyContentTypeToList, Lists.CreateContentType, Lists.DeleteContentType, Lists.GetListItemChanges, Lists.UndoCheckOut, Lists.UpdateContentType, SiteData.GetWeb
Bug Fixes and Efficiency
|Alpha||Issue Tracker Item||Function||Description|
|ALPHA2||9754||$().SPServices||New Internal Function: siteDataFixSOAPEnvelope|
|ALPHA2||9744||$().SPServices.SPComplexToSimpleDropdown||Bug in SPComplexToSimpleDropdown|
|ALPHA5||7705||$().SPServices.SPUpdateMultipleListItems||SPUpdateMultipleListItems – Add completefunc|
|ALPHA6||9785||$().SPServices.SPFilterDropdown||Extend SPFilterDropdown with CAMLQueryOptions or RecursiveAll|
|ALPHA7||9793||$().SPServices.SPCascadeDropdowns||SPCascadeDropdowns Performance Tweaks|
|ALPHA7||9794||$().SPServices.SPDisplayRelatedInfo||SPDisplayRelatedInfo Performance Tweaks|
|ALPHA8||7876||$().SPServices.SPCascadeDropdowns||SPCascadeDropdowns – 1 parent; multiple children|
|ALPHA9||9810||$().SPServices.SPCascadeDropdowns||SPCascadeDropdowns Shouldn’t Show Null Values|
|ALPHA9||9811||$().SPServices.SPComplexToSimpleDropdown||completefunc not called in SPComplexToSimpleDropdown|
|ALPHA10||9789||$().SPServices.SPComplexToSimpleDropdown||SPComplexToSimpleDropdown when column is not required|