SalesForce.com - 报告审批流程变通办法
我试图解决的问题是我们无法报告待审批的情况。
我看到建议我们更新在每个步骤之后执行的操作中路由的对象上的字段 - 但是,当该步骤用于并行批准时,这不起作用。
我一直无法找到一个可以附加触发器的对象,该触发器会在每个人批准后触发。
归根结底,我需要能够生成一份关于谁需要批准什么的报告(我知道每个人都会在他们的主页上看到他们需要批准的内容,我需要其他人能够提取报告所有待批准的事项)。
有什么想法吗?
The problem that I'm trying to workaround is that we cannot report on pending approvals.
I've seen the recommendation that we update fields on the object that is being routed in the action that executes after each step - however this doesn't work when the step is for parallel approvals.
I haven't been able to find an object I can attach a trigger to that would fire after each person approves.
At the end of the day I need to be able to product a report of who needs to approve what (I am aware that each person will see what they need to approve on their homepage, I need others to be able to pull a report on all the pending approvals).
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于我确实需要任何人都能够在任何给定时间检查所有待批准或特定用户的待批准,因此我创建了一个 VisualForce 页面并使用以下查询,具体取决于查找每个待批准或用户的待批准。
对于所有待批准的批准:
对于给定用户的待批准的批准:
然后将这些批准映射到公共视图模型以显示在 VF 页面中。
Since I really needed for anyone to be able to check all pending approvals or pending approvals for a particular users at any given time I created a VisualForce page and used the below queries depending on looking for every pending approval or ones for a user.
For all pending approvals:
For pending approvals for a given user:
These are then mapped to a common view model to displayed in the VF page.
首先也是最重要的 - 转到报告 ->行政报告->所有待批准的请求。
检查一下,看看是否可以对其进行微调以满足您的需求。如果您需要能够与非管理员共享它 - 考虑用它制作一个仪表板(可以是表格)并安排它每天运行和运行。电子邮件发送...
如果您觉得仍然需要解决方法 - 我们当然可以尝试
您是否尝试过在更新中使用公式?像
someHiddenNumberField +1
这样的东西可能会起作用(我目前无法在我的开发版本中测试它);如果不是直接这样,那么可以使用一些语法糖,例如PRIORVALUE()
。或者甚至更好 - 有一个文本字段并在其中附加日期/时间+批准者。然后在最后一步中清除“计数器”并完成。如果基于公式的更新的技巧不起作用(没有承诺,这只是一个想法),那么也许保留设置特殊字段的旧方法,但也在此对象上定义“更新前”触发器(或工作流程?但那就是又是一个公式),它将检查值,更新“计数器”并将隐藏字段设置回原始值。
First and foremost - go to Reports -> Administrative Reports -> All pending approval requests.
Check it out and see if it can be fine-tuned to match your needs. If you need to be able to share it with non-admins - consider making a dashboard out of it (can be Table) and schedule it for daily run & email sending...
If you feel you still need a workaround - we can certainly experiment with
Have you tried using formulas in the update? Stuff like
someHiddenNumberField +1
might work (I can't test it in my Dev edition at the moment); if not directly like that then with some syntactic sugar likePRIORVALUE()
. Or maybe even better - having a text field and appending in it date/time + who approved. Then in last step you clear the "counter" and are done.If trick with formula-based updates will not work (no promises, it's just an idea) then maybe keep the old way of setting special field but define also a "before update" trigger on this object (or workflow? but that's again a formula) that will check value, update "counter" and set the hidden field back to original value.