Question

I am trying to update a field of type spFieldUserValue, you know a, PeoplePicker.

The relevant code is

batchElement.InnerXml = "<Method ID='1' Cmd='Update'>" +
    "<Field Name='ID'>1</Field>" +
    "<Field Name='APersonField'>32;#This is pretty much ignored</Field>" +
    "<Field Name='Title'>Wow edited!</Field></Method>";
result = listService.UpdateListItems(strListID, batchElement);

As my code succesfully updates the APersonField with whomever is No.32 for that website (for clarification, they are not named "This is pretty much ignored", which seems to be ignored.

Anyhow, how would I, given an account name of the format [domain][user] find the relevant Number for thier lookup id in the security of the site using only the web services?

Was it helpful?

Solution

I believe that the number is the User's ID within the site. This can be determined using the Users and Groups web service by calling UserGroup.GetUserInfo (see this MSDN page for details)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top