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

Created Unassigned: SharePoint 2013 - couldn't get user's department field [10161]

$
0
0
I couldn't retrieve the user's information in SharePoint 2013,
$().SPServices({
operation: "GetUserProfileByName",
async: false,
AccountName: "domain//usrname",
completefunc: function (xData, Status) {
firstName = getUPValue(xData.responseXML, "Department");
//office = getUPValue(xData.responseXML, "Office");
}
});
return firstName;
}



function getUPValue(x, p) {
var thisValue = $(x).SPFilterNode("PropertyData").filter(function () {
return $(this).find("Name").text() == p;
}).find("Values").text();
return thisValue;
}

throwing error like
SCRIPT7002: XMLHttpRequest: Network Error 0x80070005, Access is denied.

Viewing all articles
Browse latest Browse all 6517

Trending Articles



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