SharePointUtility sample code?

Jul 15, 2010 at 3:02 PM

Does ANYONE have some sample code of how to initialize the SharePointUtility DLL object, retrieve data from a list, etc.?  I can't find that on this site ANYWHERE or any guidance on how to use this DLL.  Now, I get an "Object Reference Not Set To An Instance Of An Object".  I wouldn't know how to modify my code.  Thanks.

<font face="Consolas" size="2" color="#2b91af">

List

</font><string> fieldNames = new List<string >();<font face="Consolas" size="2"> </font><font face="Consolas" size="2">

fieldNames.Add(

</font>
"Title");<font face="Consolas" size="2"> </font>
<font face="Consolas" size="2">

fieldNames.Add(

</font>
"Start Date");<font face="Consolas" size="2"> </font>
<font face="Consolas" size="2">

fieldNames.Add(

</font>
"End Date");<font face="Consolas" size="2"> </font>
<font face="Consolas" size="2">

fieldNames.Add(

</font>
"Completed On Time");<font face="Consolas" size="2"> </font>
<font face="Consolas" size="2">

fieldNames.Add(

</font>
"PreDev Signoff");

 

 

//IEnumerable<Dictionary<string, string>>

 

var sharepointItems = ListServiceUtility.GetListItemData(new Uri("http://phoenixoffice/sites/it/itdev4d/"), "Projects", null, fieldNames, null, true, 10);

 

Coordinator
Aug 3, 2010 at 6:41 AM

Very good request, I do apologize for not having the test code in source. It was difficult since the lists they use were custom.  I'll try to dig this up for you - however looking at the source (i cannot execute this at the moment) i would say give the query parameter an empty new xelement object. There is a check on its name which may blow up if it is null.