修改 Sharepoint 中工作流任务的字段
有谁知道如何修改开箱即用 (OOTB) 工作流程任务中的字段(特别是优先级和截止日期)? OOTB 批准工作流程不允许您设置这些字段(它允许设置截止日期,但不允许设置截止时间)。
我有一个狡猾的计划,在 Visual Studio 中创建自定义工作流程以自动设置这些字段。 这涉及将我的自定义工作流程附加到任务列表并编辑审批工作流程创建的任务。 但是,当批准工作流程将新任务添加到任务列表时,我的自定义工作流程不会触发。 而且您似乎无法对工作流创建的任务列表中的项目手动触发工作流。
因此,为了设置由批准工作流程创建的任务字段,我必须以某种方式直接连接到 OOTB 批准工作流程,我不确定这是否可行。
显然,另一个选择是使用 InfoPath 和 Visual Studio 从头开始重新创建审批工作流程,但这似乎只是将优先级和时间字段添加到实例化表单中。
有什么想法吗?
Does anyone know how you can modify the fields in an out-of-the-box (OOTB) Workflow Task (specifically Priority and Due Date)? The OOTB Approval workflow doesn't allow you to set these fields (it allows setting a due date, but not a due time).
I had a cunning plan to create a custom workflow in Visual Studio to set these fields automatically. This involved attaching my custom workflow to the tasks list and editing the tasks as they were created by the Approval workflow. However my custom workflow doesn't fire when new tasks are added to task list by the Approval workflow. And it seems you are unable to manually trigger a workflow on an item in the task list that was created by a workflow.
So in order to set the task fields as they are created by the Approval workflow I'd have to somehow hook into the OOTB Approval workflow directly, which I'm not sure is possible.
Obviously another option would be to recreate the Approval workflow from scratch with InfoPath and Visual Studio, but this seems like overkill to just add priority and time fields to the instantiation form.
Any thoughts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我刚刚意识到您可以通过选择“操作”>“从任务列表中编辑优先级和截止日期(时间)”等字段。 在数据表中编辑。 这适用于普通任务列表项和由工作流创建的任务列表项。
我仍然想知道为什么设置为在任务列表中的新项目上触发的自定义工作流程在工作流程将项目添加到任务列表时不会触发。
注意:要编辑任务的到期时间,您需要修改 OOTB 任务列表,以便“到期日期”字段是日期和时间,而不是仅日期。
I've just realised you can edit field such as priority and due date (time) from the task list by selecting Actions > Edit in Datasheet. This works for normal task list items and those created by workflow.
I'd still like to know why a custom workflow that is set to trigger on new items in a task list doesn't fire when a workflow adds items to the task list.
Note: To edit the time a task is due you need to modify the OOTB task list so that the Due Date field is a Date and Time rather than Date Only.