Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

Commented Unassigned: xData.responseXML for GetList returns "Unspecified error" in SharePoint 2013 [10212]

$
0
0
I really love SPServices, so i hope identifying this issue will help to keep the quality of this library.

Implemented Javascript libraries:
jquery-1.10.2.min.js
jquery.SPServices-2013.02a.js

I try to get the rootfolder name of a document library. It works like a charm in SP 2010.

Within SP 2013 i have the following problem:
xData.responseXML returns an "Unspecified error"
![Image](http://i.imgur.com/DezK54t.png)

xData itself returns a success status and xData.responseText contains the expected value.
![Image](http://i.imgur.com/FZXlfa4.png
)

```
var currentFolderPath = "";
$().SPServices({
operation: "GetList",
async: true,
webURL: "/",
listName: listName,
completefunc: function (xData, Status) {
$(xData.responseXML).find("List").each(function() {

currentFolderPath = $(this).attr("RootFolder");
});
}
});
```
Comments: You won't get reliable results with async: true. You may be getting lucky in 2010 for some reason. I strongly suggest switching to using promises to take advantage of that superstructure. You'll want to be familiar with that pattern to work with SharePoint JavaScript in things like Display Templates, anyway. M.

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>