This isnt necessarily about the SharePoint connector but I was figuring this would be the best place.
I'm trying to modify the BizForm web part using the SharePoint Client OM to be able to create a BizForm and have it submit directly to a SharePoint list.
Right now for testing I'm just trying to pull back list items and i'm having some difficulty. Has anyone else here tried to use the SP Client OM to connect and retrieve list items?
Here is my code.
//SP.ClientContext context = new SP.ClientContext(SharePointSiteUrl);
//SP.List oList = context.Web.Lists.GetByTitle(SPList);
//context.Load(oList);
//SP.CamlQuery camlQuery = new SP.CamlQuery();
//SP.ListItemCollection collListItem = oList.GetItems(camlQuery);
//context.Load(collListItem);
//context.ExecuteQuery();
//litResponse.Text = "List Name: " + lst.Title + "<br/>";
//litResponse.Text += "Item Count: " + oList.ItemCount.ToString() + "<br/>";
//litResponse.Text += "Items: ";
//foreach (SP.ListItem item in collListItem)
//{
// litResponse.Text += "Title: " + item.FieldValues["Title"].ToString() + "<br/>";
//}
//for (var i = 0; i < oList.ItemCount; i++)
//{
// litResponse.Text += "Title: " + collListItem["Title"].ToString() + "<br/>";
//}
//context.Dispose();
I've got it all commented out right now just to test some other things. Any help would be greatly appreciated.