1

I have a method that I want to pull back data from a sharepoint list. In the method I have the following code:

var listPath = new Uri(string.Format("{0}/forms/", SitePath));
var fieldNames = new List<string> {"Id","UserName", "FullName"};
var query = XElement.Parse(@"<Query/>");
var listData = ListServiceUtility.GetListItemData(listPath, listName, string.Empty, fieldNames, query, false, 50);

when I break out listData I only have data for FullName, I don't have the other fields I wanted that I have in fieldNames.

I have not found much in the way of examples in C# and the VB example only makes a call for 1 field. Kind of pointless if I cant bring back more than one field in a list.

Am I using the wrong method? How can I get more than one field in my collection of data?

Any help would be appreciated.

4

0 回答 0