jQuery Library for SharePoint Web Services v0.5.4 Released

2 minute read

I released v0.5.4 of the jQuery Library for SharePoint Web Services (SPServices) last Friday, April 9.  There were quite a few important changes in the library in this release, as well as a nice new function, $().SPServices.SPAutocomplete.

Before this release, there were issues with the $().SPServices.SPRedirectWithID function in MOSS.  It had been hard to nail down what the actual issue was, but it turned out that MOSS doesn’t deal with the Query String values for ContentTypeID and ListID in quite the same way as WSS does.  In v0.5.4, I’ve got a fix in place that, based on my and other’s testing, fixes this issue, and $().SPServices.SPRedirectWithID should work well now in both environments.

Another bug which had been tough to track down involved $().SPServices.SPGetCurrentUser. When you would log out as one user and back in with another using the ‘Sign in as a Different User’ menu option, the $().SPServices.SPGetCurrentUser function would continue to return the prior user.  This is an issue with SharePoint in general, I find, and that’s backed up by the responses in my ‘Sign in as Different User’ Not “Taking” thread over at SharePointOverflow.com.  (SharePoint Overflow is a great site, by the way, where you can get some good answers to your SharePoint questions.  I’m a moderator over there.)  v0.5.4 contains a fix that I hope will solve this issue for once and for all.

The final big change is the addition of the $().SPServices.SPAutocomplete function.  Christophe Humbert, of Path to SharePoint fame, asked me whether I had a function like this a while back, and it seemed like a good idea to build it.  I posted previously about SPAutocomplete, but in this released version, I scaled back on the options a bit to help make the function little easier for you to follow.

Hope you enjoy all the changes!

Release Notes

    • Fix for bug in $().SPServices.SPRedirectWithID where the redirection would not work in MOSS environments.
    • Replaced change event with blur event in $().SPServices.SPRequireUnique for more reliable duplicate checking.
    • Small efficiency gains in selectors on the Web Services XML responses
    • Fixed erroneous values for needs_SOAPAction. Read only functions should be set to false, write functions to true.
    • Added a unique Query String parameter to the call to userdisp.aspx in $().SPServices.SPGetCurrentUser per arunduttgp‘s suggestion. This seems to force the browser to do a hard refresh on the page in the AJAX call, getting the correct values for the logged in user even when the current SharePoint page is showing the prior user.
    • Changed the id for the containing DIV in $().SPServices.SPDisplayRelatedInfo to be consistent with other containing DIVs: "SPDisplayRelatedInfo_" + columnStaticName
    • Added function $().SPServices.SPGetStaticFromDisplay to facilitate the above change
    • New function $().SPServices.SPAutocomplete
    • Improved debug mode error message box behavior
    • Expanded $().SPServices.SPGetCurrentUser to have an option so that you can specify which value from userdisp.aspx you’d like returned. The default is still the user’s account (Name in the Field Internal Name column below). You can specify any of the Field Internal Names for option fieldName.
Field Name Field Internal Name WSS MOSS
Account Name
Name Title
Work e-mail EMail
About me Notes
Picture Picture
Department Department
Job Title JobTitle
SIP Address SipAddress
First name FirstName  
FirstName LastName  
Work phone WorkPhone  
Office Office  
User name UserName  
Web site WebSite  
Responsibilities SPResponsibility  

Have a thought or opinion?