SharePoint Online Merge Unsupported

孤街浪徒 提交于 2021-01-27 06:41:59

问题


I am trying to merge an item into an existing list in SharePoint Online, but receive the following error:

"The type SP.ListItemEntityCollection does not support HTTP PATCH method."

My configuration is as stated in Microsoft documentation. https://msdn.microsoft.com/en-us/library/office/jj164022.aspx

Is there a problem with the permissions for this type of item in the list? How can I modify that? I have seen no references to different types, or resolving this issue.


回答1:


This error usually occurs when invalid resource endpoint is specified.

Endpoint to create SP.ListItem resource

Url : /_api/web/lists/getbytitle(<listTitle>)/items
Method: POST
Data: <item payload>

Make sure endpoint for SP.ListItemEntityCollection resource is specified for that operation.

Endpoint to update SP.ListItem resource

Url : /_api/web/lists/getbytitle(<listTitle>)/items(<itemid>)
Method: POST
Headers:
    "X-HTTP-Method": "MERGE",
    "If-Match": "*"
Data: <item payload>

Make sure SP.ListItem resource url is specified for that operation. For example, the following url /_api/web/lists/getbytitle(<listTitle>)/items?$filter=Id eq 1 is invalid in that case and the specified error will occur while updating list item.



来源:https://stackoverflow.com/questions/38774918/sharepoint-online-merge-unsupported

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!