Force.com 工作流程 - 它们与触发器有何不同?
在force.com 上,工作流程与触发器有何不同?在我看来,工作流程基本上是创建触发器并定义触发该触发器时会发生什么的另一种方式。我错过了什么吗?它与触发器完全不同还是只是输入触发器的一种更友好的方式?
On force.com, how are workflows different from triggers? It seems to me that the workflows are basically another way of creating a trigger and defining what happens when that trigger is triggered. Have I missed something? Is it completely different to triggers or is it just a friendlier way of entering triggers?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的 - 工作流程(几乎)只是输入触发器的一种更友好的方式。它们允许“按钮单击管理”定义响应数据库中的事件而要执行的操作。您可以通过编写触发器代码来复制任何工作流程,但反之则肯定不行。
Salesforce 社区的普遍共识是,如果可以通过配置或代码达到相同的目的,那么最好走配置路线。
Force.com 上的这篇文章讨论板提供了有关您何时可能想要继续编写触发器的更多详细信息。
Yes - workflows are (pretty much) just a friendlier way of entering triggers. They allow the 'button-click admin' to define actions to be performed in response to events in the database. You can replicate any workflow by writing trigger code, but certainly not vice versa.
The general consensus in the Salesforce community is that, if you can achieve the same end through configuration or code, it's better to go the configuration route.
This post on the Force.com discussion board has a little more detail on when you might want to go ahead and code a trigger.