Click here to Skip to main content
       

Sharepoint

 
QuestionAccessing SharePoint information regarding specific documents Pinmembermuneebalikiyani13-Feb-13 18:04 
AnswerRe: Accessing SharePoint information regarding specific documents Pinmemberihoecken13-Feb-13 21:57 
QuestionPopulating list columns in Sharepoint 2010 custom doc library PinmemberAptiva Dave10-Feb-13 7:15 
AnswerRe: Populating list columns in Sharepoint 2010 custom doc library PinmemberAnandSharmaUK20-Feb-13 0:27 
QuestionSoftware and Hardware requirements for document shareing PinmemberHemadriT7-Feb-13 7:24 
AnswerRe: Software and Hardware requirements for document shareing Pinmemberihoecken10-Feb-13 21:10 
Question[[Watch]] Workaholics Season 3 Episode 14 STream Free - Fourth and Inches Pinmembera uj6-Feb-13 16:30 
QuestionDeleting Items in a SPListItemCollection PinmemberAptiva Dave31-Jan-13 5:05 
Been having some trouble with doing this and have looked all over the internet for the actual solution. At first I was using a for each loop and deleting individual spitem objects, but that doesn't work since the enumeration changes after each deletion.
 
So, I found a blog post about deleting using the ProcessBatchData method. Here is my code:
Dim sbDelete As StringBuilder = New StringBuilder
                    Dim xmlFormat As String = "<?xml version=""1.0"" encoding=""UTF-8""?>"
                    sbDelete.Append(xmlFormat)
                    sbDelete.Append("<Batch>")
                    Dim buildQuery As String = "<Method><SetList Scope=""Request"">" & fList.ID.ToString & "</SetList>"
                    buildQuery = buildQuery & _
                        "<SetVar Name=""ID"">{0}</SetVar Name=""Cmd"">Delete</SetVar></Method>"
                    For Each x As SPListItem In flItems
                        sbDelete.Append(String.Format(buildQuery, x.ID.ToString()))
                    Next
                    sbDelete.Append("</Batch>")
                    web.ProcessBatchData(sbDelete.ToString)
This runs fine, but when I go to the list where the items where supposed to be deleted from I find that they are still there.
 
This web app is a fuel log for our Flight Operations department. What I'm trying to do is when the Admins delete a plane from the system, SharePoint would then deleted all of the fuel log entries for that plane. I figured it would be simple to do, but either I'm doing something wrong or it isn't as simple as I think.
AnswerRe: Deleting Items in a SPListItemCollection PinmemberJimmyRopes7-Feb-13 1:39 
QuestionGetting an error when trying to upload a document PinmemberJimmyRopes30-Jan-13 2:35 
AnswerRe: Getting an error when trying to upload a document Pinmemberihoecken30-Jan-13 2:50 
GeneralRe: Getting an error when trying to upload a document PinmemberJimmyRopes30-Jan-13 4:03 
AnswerRe: Getting an error when trying to upload a document Pinmemberihoecken30-Jan-13 4:55 
AnswerRe: Getting an error when trying to upload a document Pinmemberihoecken30-Jan-13 2:57 
GeneralRe: Getting an error when trying to upload a document PinmemberJimmyRopes30-Jan-13 4:05 
QuestionRequest for Sharepoint tutorial links Pinmemberobalesu28-Jan-13 18:18 
AnswerRe: Request for Sharepoint tutorial links Pinmemberihoecken28-Jan-13 21:13 
QuestionCan CAML query handle multiple lists? PinmemberClark Kent12328-Jan-13 5:35 
AnswerRe: Can CAML query handle multiple lists? Pinmemberihoecken28-Jan-13 21:17 
GeneralRe: Can CAML query handle multiple lists? PinmemberClark Kent12329-Jan-13 1:34 
QuestionThrowing an exception when trying to attach a document to a list item PinmemberJimmyRopes25-Jan-13 2:34 
AnswerRe: Throwing an exception when trying to attach a document to a list item PinmemberAptiva Dave31-Jan-13 5:07 
GeneralRe: Throwing an exception when trying to attach a document to a list item PinmemberJimmyRopes31-Jan-13 13:30 
GeneralRe: Throwing an exception when trying to attach a document to a list item PinmemberJimmyRopes7-Feb-13 2:31 
QuestionHo to Enable Titlle Column in Document Library using power shell in sharepoint 2010 Pinmemberps4124-Jan-13 18:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.140926.1 | Last Updated 26 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid