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

New Post: $().SPServices.SPGetCurrentUser not returning a user ID

$
0
0
To start: thanks for this tool. It's really amazing.

I'm having trouble getting my current user's ID -- am using SP2014.01 and jQuery 1.11.1 along with SP2007. I can get the user's name and other fields (depending on which are defined) but I can't come up with the user's ID.

I have a list that has a ShaerPoint User ('Person or Group') as a column and I want to be able to filter results based on the current logged in user using a lookup filter.

Everywhere I look online indicates this should work:
var thisUsersValues = $().SPServices.SPGetCurrentUser({
    fieldNames: ["ID", "Name"],
    debug: false
});
var id = thisUsersValues["ID"];             // doesn't work, 'undefined'
var name = thisUsersValues["Name"]; // works!
Shouldn't ID be a dead set grab ? Thanks.

Viewing all articles
Browse latest Browse all 6517

Trending Articles



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