Share via

Sharepoint Online - Update task list items

GECKO SOFTWARE 1 Reputation point
2021-12-21T13:34:25.033+00:00

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 wich 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 synchronuously with the concerned item (but not updated).

Here is the SOAP enveloppe 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 ?

Merci à tous ! Julien

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,496 Reputation points Microsoft External Staff
    2021-12-22T02:14:45.85+00:00

    Hi @GECKO SOFTWARE ,
    You can refer to following code to update items

    159445-test.txt


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.