Hi Marc,
Thank you very much for your reply.
I used 'GetUserProfileByName' method to get the user profile information of any given user.
It is working well for the current user, but if I user any other user name, it is not returning any values.
The following is the code.
var PPValue = "Domain\\anyusername";
$().SPServices({
operation: 'GetUserProfileByName',
AccountName:PPValue ,
async: true,
completefunc: function (xData, Status)
{
var properties = xData.responseXML.getElementsByTagName('PropertyData');
var propertyValues = new Array();
alert(properties.length);
for (var i=0; i < properties.length; i++)
{
var propName = properties[i].getElementsByTagName('Name')[0].childNodes[0].nodeValue;
propertyValues[propName] = properties[i].getElementsByTagName('Value');
var oValueNode = properties[i].getElementsByTagName('Value');
if(oValueNode.length > 0)
{
propertyValues[propName] = oValueNode[0].childNodes[0].nodeValue;
}
else
{
propertyValues[propName] = '';
}
}
$().SPFindPeoplePicker({
peoplePickerDisplayName: "Manager",
valueToSet: propertyValues["Manager"],
checkNames: true
});
}
});
Thank you for your help in fixing this error.
Thanks,
Maria