'Sharepoint Online - Update task list items

We are having issues with updating task lists in Sharepoint Online. Process is:

  • We have a Sharepoint Online site with a task list in it (compatible list with MS Project).
  • We have a web application (PHP) from which we call Sharepoint Web services to update fields in that task list.

Our issue is the update itself. We get no error from the WS Sharepoint, which reply synchronously with the concerned item (but not updated).

Here is the SOAP envelope we send:

<SOAP-ENV:Envelopexmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"xmlns:ns1="http://schemas.microsoft.com/sharepoint/soap/">
    <SOAP-ENV:Body>
        <UpdateListItemsxmlns="http://schemas.microsoft.com/sharepoint/soap/">
            <listName>EMU200601SIM</listName>
            <updates>
                <BatchListVersion="1"OnError="Continue">
                    <MethodCmd="Update"ID="1">
                        <FieldName="afacturerdebut">30</Field>
                        <FieldName="afacturerfin0">70</Field>
                        <FieldName="ID">1773</Field>
                    </Method>
                </Batch>
            </updates>
        </UpdateListItems>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Here are the headers :

Content-Type: text/xml;
SOAPAction: "http://schemas.microsoft.com/sharepoint/soap/UpdateListItems";

Version control is not activated on the task list. Reading the tasklist works fine but updating it does not work: fields of the item are not updated. I've tried changing the list name, field name, and I think everything is well configured cause I don't have any error.

It's weird Sharepoint WS does reply with the item but does not execute the UpdateListItems operation.

Did someone successfully update a tasklist by calling Sharepoint Online WS?



Solution 1:[1]

I finally found my mistake: Sharepoint column names and case. You need to provide exactly the same letter case for the column names in order to update an item in a list. It could be nice from Microsoft to have an error code for "unknown column" instead of no error at all...

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Julien Gecko