我的历史记录表太大而无法查看(超过 5k 条记录).尝试创建工作流以删除条目 [英] My history table is too large to view (over 5k records). Trying to create workflow to delete entries
问题描述
我有一个查询历史表的工作流,返回一个 ID 列表,并尝试删除其中的每一个项目.我的第一个 REST 调用是
<站点 URL>/_api/lists/GetByTitle('Workflow%20History')/Items?$select=Id
这将返回一组有效的记录,然后我有第二个休息调用来删除记录这是一个带有端点的 POST REST 调用:
<站点 URL>/_api/web/lists/getbytitle('工作流历史')/GetItemById(1)
我收到一个错误的请求作为对第二个 REST 调用的响应.我宁愿不选择然后删除,而是根据过滤条件删除.任何帮助,我将不胜感激.
谢谢
您可以参考这篇文章在工作流中使用 rest api 删除列表项:
I have a workflow that queries the history table returns a list of IDs and trying to delete each of those items. My first REST call is
<site URL>/_api/lists/GetByTitle('Workflow%20History')/Items?$select=Id
This returns a valid set of records, then I have a second rest call to delete a record It's a POST REST call with the end point:
<site URL>/_api/web/lists/getbytitle('Workflow History')/GetItemById(1)
I get a bad request as a response to the second REST call. I'd prefer to not select and then delete and just delete based on a filter condition. Any assistance, I would appreciate some help.
Thank you
You could refer to this post to delete list item using rest api in workflow: https://social.technet.microsoft.com/Forums/en-US/ef8057c3-c96a-4d04-b3c4-4c8bcd7ce2d2/sharepoint-designer-2013-call-http-web-service-delete-workflow-not-working?forum=sharepointdevelopment
the header dictionary should as below:
这篇关于我的历史记录表太大而无法查看(超过 5k 条记录).尝试创建工作流以删除条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!