Sharepoint自动报告 [英] Sharepoint automatic report

查看:74
本文介绍了Sharepoint自动报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我有一些简单批准工作流程的列表。我想要做的是创建某种"报告"。在那里,我将看到所有未经批准(正在进行中)的项目,并将其收到自定义电子邮件。要查看当前待审批准人也是
很好。


我会很感激任何想法。我更喜欢非编码解决方案。



非常感谢



David

解决方案

< span style ="color:#1F497D">嗨David,


< span style ="color:#1F497D">根据我的知识,你需要代码来实现它。


如果您想获得待审批人,则需要从所有特定工作流任务列表中检索所有审批工作流任务,而不是直接从项目中获取
名单。


工作流程任务具有以下属性:



  • 状态:任务状态
  • WorkflowOutcome:results
  • WorkflowListId:相对列表GUID
  • WorkflowItemId:相对项目ID
  • AssignedTo:用户谁被分配到。

检查每个任务以查看其状态字段是否未完成且WorkflowOutcome是否不等于Approved / Rejected。通过WorkflowListId和WorkflowItemId找到相对。


将这些数据写入正文,然后使用_api / SP.Utilities.Utility.SendEmail发送电子邮件。


关于如何获取列表项和从SharePoint发送电子邮件的演示:


< p style ="margin-bottom:12.0pt; line-height:125%; background:white"> https://blogs.msdn.microsoft.com/akirsman/2011/09/09/code-for-sending-emails -from-sharepoint /


最好 问候,


琳达&NBSP;张


Hello,

I have some lists with simple approval workflow. What I want to do is to create some kind of "report" where I will see all items which are not approved (in progress) and receive this to custom email. To see current pending approvers would be also nice.

I would be grateful for any ideas. I prefer non coding solution.

Thanks a lot

David

解决方案

Hi David,

Per my knowledge, you need code to achieve that.

If you want to get pending approvers, you need to retrieve all approval workflow tasks from all particular workflow tasks lists instead of directly getting items from list.

The workflow task has the following properties:

  • Status: the task status
  • WorkflowOutcome: outcome
  • WorkflowListId: the relative list GUID
  • WorkflowItemId: the relative item id
  • AssignedTo: the user who has been assigned to.

Check each task to see if its Status field is not Completed and WorkflowOutcome is not equal to Approved/Rejected. Find the relative by WorkflowListId and WorkflowItemId.

Writing these data to the body and then send email with _api/SP.Utilities.Utility.SendEmail.

A demo about how to get list items and sending email form SharePoint:

https://blogs.msdn.microsoft.com/akirsman/2011/09/09/code-for-sending-emails-from-sharepoint/

Best regards,

Linda Zhang


这篇关于Sharepoint自动报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆