我们有一个SharePoint Online网站,用户可以在该网站上向文档库添加/删除项目。但是,我们希望添加一个步骤,以便在实际删除项目之前批准删除操作(不希望从回收站恢复项目)。这个是可能的吗?
发布于 2019-02-16 04:29:18
不幸的是,只有当文件/项目已经被删除时,才会在删除之前没有触发器。您可以在项目被删除时触发流程,请求审批,如果项目被拒绝,则使用REST API从回收站查找并恢复项目。
在回收站中找到合适的项目有点棘手,但这是可以实现的。

截图中的first(...)为:first(body('Parse_JSON')?['value'])?['Id']
解析JSON操作中的架构:
{
"type": "object",
"properties": {
"odata.metadata": {
"type": "string"
},
"value": {
"type": "array",
"items": {
"type": "object",
"properties": {
"odata.type": {
"type": "string"
},
"odata.id": {
"type": "string"
},
"odata.editLink": {
"type": "string"
},
"AuthorEmail": {
"type": "string"
},
"AuthorName": {
"type": "string"
},
"DeletedByEmail": {
"type": "string"
},
"DeletedByName": {
"type": "string"
},
"DeletedDate": {
"type": "string"
},
"DeletedDateLocalFormatted": {
"type": "string"
},
"DirName": {
"type": "string"
},
"DirNamePath": {
"type": "object",
"properties": {
"DecodedUrl": {
"type": "string"
}
}
},
"Id": {
"type": "string"
},
"ItemState": {
"type": "integer"
},
"ItemType": {
"type": "integer"
},
"LeafName": {
"type": "string"
},
"LeafNamePath": {
"type": "object",
"properties": {
"DecodedUrl": {
"type": "string"
}
}
},
"Size": {
"type": "string"
},
"Title": {
"type": "string"
}
},
"required": [
"odata.type",
"odata.id",
"odata.editLink",
"AuthorEmail",
"AuthorName",
"DeletedByEmail",
"DeletedByName",
"DeletedDate",
"DeletedDateLocalFormatted",
"DirName",
"DirNamePath",
"Id",
"ItemState",
"ItemType",
"LeafName",
"LeafNamePath",
"Size",
"Title"
]
}
}
}
}https://stackoverflow.com/questions/54715557
复制相似问题