How to delete a list item in Sharepoint 2007 via SOAP?

I am looking to delete a list item using soap web services. I am using the Lists.asmx web service.
The XML looks like this:
<Batch OnError="Continue" ListVersion="1">
<Method ID="1" Cmd="Delete">
<Field Name="ID">7</Field>
</Method>
</Batch>
I got this from the msdn docs at http://msdn.microsoft.com/en-us/library/lists.lists.updatelistitems%28v=office.12%29.aspx
And I am using the Lists.UpdateListItems Method.
I am doing this in python and python has a library, suds for this purpose. However I get this exception:
suds.WebFault: Server raised fault: 'Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.'
I have looked for typos, and verified the XML format. Where am I going wrong?
Some help please.

http://linesofcode.net/snippets/166

Similar Messages

  • How to delete a list-item with Contribute 4

    I use Contribute for a lot of my client for years and a few
    weeks ago i installed Contribute 4 for the first time for a new
    client .We dicovered that it's difficult or impossible to delete a
    list-item in a unordered list. Maybe also in other list-types but
    we haven't tried this yet. Does anybody know how to delete a
    list-item? In Contribute 3 you just had to use the backspace button
    but that isn't working anymore.
    Thanks for your help.
    Maarten Strik
    www.strikdesign.nl

    http://linesofcode.net/snippets/166

  • How to update selected list items in SharePoint 2010?

    Hello All
    I have a list containing field named "Category". I want to develope a solution which will take two inputs: Old Category and New Category. The expected result is: all the list items will be fetched which have Old Category input value in
    their category field and the field is replaced with the input value New Category.
    I have a limitation that I can not use Visual Studio. So I am thinking to create aspx page with content editor webpart. But I am new to all these things. Could you please suggest the development approach for this?
    Thanks.

    Hello,
    I don't think CEWP can help you because you won't be able to find old and new category when there is any change in list. However you can identify the latest modified item from list but how will you identify whether category is old or new. If you have any
    other column in list which can tell you that category value has been updated then you can write ECMA or Jquery script to update other items.
    If have any column in list then see below jquery code, where you will see how to query the list: (In my case it is Active)
    var soapEnv = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'><soapenv:Body><GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>";
    soapEnv += "<listName>Highlights</listName>";
    soapEnv += "<query><Query><Where><Eq><FieldRef Name='Active' /><Value Type='Text'>Yes</Value></Eq></Where><OrderBy Override='TRUE'><FieldRef Name='Modified' Ascending='FALSE' /></OrderBy></Query></query>";
    soapEnv += "<viewFields><ViewFields><FieldRef Name='Title'/><FieldRef Name='ows_FileLeafRef'/><FieldRef Name='Links'/></ViewFields></viewFields><rowLimit></rowLimit>";
    soapEnv += "</GetListItems></soapenv:Body></soapenv:Envelope>";
    Please comment if i misunderstood you?
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to delet reading list items

    I've noticed I can add items to my reading list, I don't know how to delete spacific items from the list.

    First of all thank you both.
    Now I still have some problems..
    On the trigger WHEN-NEW-FORM-INSTANCE I wrote this code:
    DECLARE
    rg_fakultet RECORDGROUP;
    rg_fsmer VARCHAR2(20) := 'F_IME';
    flist_ID Item := Find_Item('SMERI.F_IME');
    nDummy NUMBER;
    BEGIN
    rg_fakultet := Find_Group(rg_fsmer);
    IF NOT Id_Null(rg_fakultet) THEN
    Delete_Group(rg_fakultet);
    END IF;
    rg_fakultet := CREATE_GROUP_FROM_QUERY(rg_fsmer,'SELECT F_IME, TO_CHAR(F_IME) FROM FAKULTETE');
    Clear_List(flist_ID);
    nDummy := Populate_Group(rg_fakultet);
    Populate_List('SMERI.F_IME',rg_fakultet);
    END;
    And it works more or less
    But, on the F_ime I wrote on trigger WHEN-LIST-CHANGED this code:
    DECLARE
    rg_smer RECORDGROUP;
    rg_ssmer VARCHAR2(20) := 'SMER';
    slist_ID Item := Find_Item('SMERI.SMER');
    nDummy NUMBER;
    BEGIN
    rg_smer := Find_Group(rg_ssmer);
    IF NOT Id_Null(rg_smer) THEN
    Delete_Group(rg_smer);
    END IF;
    rg_smer := CREATE_GROUP_FROM_QUERY(rg_ssmer,'SELECT SMER, TO_CHAR(SMER) FROM SMERI');
    Clear_List(slist_ID);
    nDummy := Populate_Group(rg_smer);
    Populate_List('SMERI.SMER',rg_smer);
    END;
    And it doesn't work, there is nothing in the item SMER.
    Can you tell me what code to write for the item SMER?
    Thanks!

  • How to update a list item through Sharepoint Designer Workflow?

    Hi,
    I have a created a list, in which "Completion date" column is there.
    Now I want to update column "Completion Date" through SPD, specifies value(date) after 10 days of created date of a record in list.
    Please help.
    Thanks in advance

    Hi,
    You can use the "Build Dynamic String" action to convert the date field to a string,
    And use string comparison to determine if the date is blank
    For more information, please refer to
    http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!498.entry
    Hope this helps
    Thanks!
    Stanfford

  • How to display the count of a list item in Sharepoint Designer?

    How to display the count of a list item in Sharepoint Designer? please reply with the proper code line to add for this.

    Hello,
    What version of sharepoint you are using? Try below approach:
    http://sharepointlogics.com/2010/03/total-count-of-items-in-list-in.html
    Hope it could help
    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer
    Please feel free to unmark answer if does not resolves your problem.

  • Create List Item using SharePoint 2010 Workflow

    Hello everyone.
    I found in youtube video using SP Employee Onboarding Web Part, idea is quite simple and powerful. But this web part available only in SP 2013, and I use 2010. So I wanted to develop my own version.
    Questions is:
    I have 2 lists Employee OnBoards (list contains data about new employee) and Employee OnBoards Tasks (list contains approval task). Where field Employee Name from Employee OnBoards list is lookup field in Employee OnBoards Tasks list.
    I need emplement next:
    When new Item created in Employee OnBoards list, it should copy Employee Name value to the Name field of the Employee OnBoards Tasks list.
    I hope I explained understandable.
    Thanks.

    Hi Azamat,
    This you can do by using SharePoint Designer workflow.
    Create a sharepoint designer workflow and invoke that when new item will create in the list Employee
    OnBoards.
    then use Copy List item action to copy employee name to employee on board task list.
    Below link will help you how to use copy list item action in a workflow.
    http://blogs.salmanghani.info/copy-item-workflow-using-sharepoint-designer-2010/
    Hope this will help you.
    Regards
    Soni K

  • Workflow - how to update multiple list items

    Is it possible to update up to 3 list items with the same information using a workflow?  My scenario is where a company vehicle (registration number) has up to three drivers assigned to it - Driver Name 1, Driver Name 2 and Driver Name 3.   I
    have two separate lists - one for vehicles (fleet list) and one for drivers (driver database).  In my workflow when an item is created or changed in the fleet list, I would like the current vehicle registration to be updated in all three driver records
    in the driver database.  I am not sure if I can do this as I am unsure of what my unique look up would be as I need to be able to tie a vehicle registration to a driver name. Any advice would be much appreciated.
    Thanks

    Hi,
    Refer to the following threads about how to update multiple list items simultaneously.
    http://social.technet.microsoft.com/Forums/en-US/936d05ba-6e86-4f44-bbdb-b3c5c12b2c68/how-do-i-update-multiple-list-items-at-once-in-a-sharepoint-list
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/2d342b01-1978-40c9-a203-303d145b331e/how-to-update-mulitple-list-items-at-same-time
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/8d5b7424-58dc-470b-8142-90755dbdeaae/sharepoint-workflow-change-multiple-items-in-other-list
    Thanks.
    Tracy Cai
    TechNet Community Support

  • What is the best approach to delete multiple list items

    Hi
    I want to delete multiple list items at once, what is best approach please suggest?
    Ramesh

    Hi Ramesh,
    Better approach for removing many items from a list is to use the ProcessBatchData method provided by the SPWeb class. First, you need a collection of the list items
    you want to remove, and then you can use the Get-SPListItem function to retrieve a list of items that match a given criteria. Then build a batch string with resultant items and call the ProcessBatchData method.
    Here is the sample code.
    function Get-SPList($webUrl, $lstUrl)
    $webObj = Get-SPWeb -identity $webUrl
    $lstObj = $webObj.GetList($lstUrl);
    return $lstObj
    $spList = Get-SPList -webUrl "http://mysitecollecton/MySite" -lstUrl "http://mysitecollecton/MySite/Lists/EmpInfo"
    $spQuery = new-object Microsoft.SharePoint.SPQuery
    $camlQuery =
    "<Where>
    <Eq>
    <FieldRef Name='Department' />
    <Value Type='Text'>HR</Value>
    </Eq>
    </Where>"
    $spQuery.Query = $camlQuery
    $spQuery.RowLimit = 100
    $spListItemCollection = $spList.GetItems($spQuery)
    # Create batch remove CAML query
    $batchRemove = '<?xml version="1.0" encoding="UTF-8"?><Batch>';
    # The command is used for each list item retrieved
    $command = '<Method><SetList Scope="Request">' +
    $spList.ID +'</SetList><SetVar Name="ID">{0}</SetVar>' +
    '<SetVar Name="Cmd">Delete</SetVar></Method>';
    foreach ($item in $spListItemCollection)
    $batchRemove += $command -f $item.Id;
    $batchRemove += "</Batch>";
    # Remove the list items using the batch command
    $spList.ParentWeb.ProcessBatchData($batchRemove) | Out-Null
    Please don't forget to mark it answered, if your problem resolved or helpful.

  • How to delete the downloading items in itunes?

    how to delete the downloading items in itunes?

    Unfortunately, this doesn't work. If you let them download and delete them, they just download again at some point in the future. I've been trying to figure this one out myself, but so far, every time I remove something, it comes back "later".
    Steve

  • FAQ - Print a List Item in SharePoint 2010

    FAQ - Print a List Item in SharePoint 2010
    step 1) Open a List;
    step 2) Hit the List tab;
    step 3) Click the Form Web Parts dropdownlist;
    step 4) Choose “Default Display Form”;
    step 5)At the top of the Page – Insert Tab, Click the Web Part button to add a new Content Editor web part (CEWP);
     step 6) From Categories choose “Media and Content” > “Content Editor” and add it to the main section of the page;
     Click the “Click here to add content” and then click the HTML button in the Ribbon to bring up the Edit source code window;
     In the window add the following code to display a Print Button at the top of the list item window.
    input type=”button” value=” Print” onclick=”window.print();return false;” 
    step 7) Next, hit the Page tab at the top of the page to view the List item. You should see the Print button;
     Hit the Print button to print just the list item.
    Amalaraja Fernando,
    SharePoint Architect
    This post is provided "AS IS" with no warrenties and confers no rights.

    References:
    http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/28f02631-2291-4f8c-875a-4fa5397536ee/
    Amalaraja Fernando,
    SharePoint Architect
    This post is provided "AS IS" with no warrenties and confers no rights.

  • How to delete a line item from the sales order

    Hi all,
    how to delete a line item from the sales order for which the production is already happened and it has been delivered. the production order status is DLV.
    Regards
    Kumar

    Hi
    U can do this in two ways one u can short close the order by entering Reason for rejection in VA02 at header level and if yr order is multiple line item order u can enter the reason for rejection in any of the line item which u don't want to deliver.
    This is called short close ( as the qty is not delivered fully).
    Thx.

  • How to delete the line item from a sales order

    Hi all,
    how to delete a line item from the sales order for which the production is already happened and it has been delivered. the production order status is DLV.
    Regards
    Kumar

    Hi Kumar,
    I think you can just delete it in the sales order directly, if you are using make-to-order scenario, then there will be special stock left for the sales order as the production has been goods receipt, you need to use MM transaction move the stock to unrestricted use stock. If you are using make-to-stock scenario, there should be no further problem. If you are using assembly order, please try to reject the sales order item to see if it could fullfill your requirement.
    Regards,
    Rachel

  • How to delete reading list in ios 7

    Please i want to know how to delete reading list in ios7

    I Have been trying to work this one out for ages.  Many thanks.  Simple when you know how  . 

  • How to make a list item field with DATE data type?

    I have a column with DATE data type. Using forms 6i I want to generate a poplist list item field with this column while the value of the elements in the list to will be day names like SATURDAY,SUNDAY,MONDAY. if we change the data type from date to char, it will work properly but now with DATE data type behind it, it gives the following error message
    "FRM-32082: Invalid value for given item type.
    List WEEKREST
    Item: WEEKREST
    Block: EMPRESTS
    Form: MODULE3
    FRM-30085: Unable to adjust form for output."
    Using forms 6i how to make a list item field with DATE data type which can hold day names?

    Set your date column as a hidden (non-displayed) field. Create your list item with the varchar2 day names. Create the list item as a non-base-table field that accepts the text values of day names. On that field, create a when-validate-item trigger that translates the text into a real date, which it then uses to set the value of the actual base-table item.

Maybe you are looking for