【问题标题】:Approval Flow for deleting items删除项目审批流程
【发布时间】:2019-02-15 18:58:58
【问题描述】:

我们有一个 SharePoint Online 网站,用户可以在其中向文档库添加/删除项目。但是,我们想添加一个步骤,以便在实际删除项目之前批准删除操作(不想从回收站恢复项目)。这可能吗?

【问题讨论】:

    标签: sharepoint workflow sharepoint-online flow sharepoint-workflow


    【解决方案1】:

    不幸的是,只有当文件/项目已经被删除时,才删除文件/项目之前没有触发器。您可以在删除项目时触发 Flow,请求批准,如果它被拒绝,则使用 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"
                    ]
                }
            }
        }
    }
    

    【讨论】:

    • 这看起来是朝着正确方向迈出的一步...... ¿您能详细说明如何获取 JSON 架构吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-12
    • 1970-01-01
    • 2016-01-09
    • 2014-10-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多