This project has moved and is read-only. For the latest updates, please go here.

fieldName: "ID" is undefined with $().SPServices.SPGetCurrentUser

Jan 2, 2015 at 8:10 PM
On some site pages I've created, I've tried returning the Sharepoint ID and I'm getting nothing here... while on others, it seems to work ok.
console.log($().SPServices.SPGetCurrentUser({ fieldName: "ID" }));
//LOG: "", should read LOG: 934

console.log($().SPServices.SPGetCurrentUser({ fieldName: "Name" }));
//LOG: SWA\michael.j.burling
Any ideas what could be missing here? Other functions seem to be working appropriately.
Jan 2, 2015 at 9:21 PM
Are you running with the most recent version of SPServices? 2014.02 There was a bug in earlier versions when you make the call in the root Site Collection.