Tag Info

Hot answers tagged

2

CAML schema is case-sensitive. You need to change <values> to <Values>. In general all elements are capitalized, but for some reason there are elements like <CHOICES> written in uppercase. When in doubt, best reffer to Collaborative Application Markup Language (CAML) schemas on MSDN.


1

sigh .... Turns out I should have removed the .get_url() from my if condition and it should have been: if(oListItem.get_item("Image"))


1

You can use: string value = (new SPFieldLookupValue(item["FieldName"] as String)).LookupValue


1

SharePoint object model also has a nifty way of getting all the values. GetDataTable method returns a data table with all the field values. Update: To return all fields as string, you can clone the DataTable and get string values in another DataTable. DataTable dt = list.GetItems(new SPQuery()).GetDataTable(); DataTable dtClone = dt.Clone(); //just copy ...


1

Found the solution... Here's how I changed my code. private void UploadAttachments(Helper sharePointHelper, IList<HttpPostedFile> postedFileCollection, int itemId) { // Get the list SPList listToUpdate = Helper.GetList(this.BackendListName); SPListItem itemToUpdate = null; // Get the existing item to update itemToUpdate = ...



Only top voted, non community-wiki answers of a minimum length are eligible