Salesforce:触发工作流规则的触发器已停止工作 - 有什么想法吗?
因此,在我们自定义的 Salesforce 系统的一部分中,会发生以下情况:
- 触发器更改自定义对象上的选项列表的值,
- 工作流规则检测到该更改并发出电子邮件。
但从 12 月 4 日左右开始,它似乎就停止工作了。 编辑:调试日志显示触发器正在触发并更改选项列表的值,但没有评估 Worflow 规则。
工作流程规则非常简单,所以我不太明白是什么阻止了它。该规则的详细内容是:
对自定义对象进行操作。
评估标准:创建记录时,或编辑记录且之前不符合规则标准时
规则标准:ISPICKVAL(Status__c, '未开始')
主动:是
立即工作流程操作:电子邮件警报
编辑:如果我手动更新对象以设置适当的状态,则规则会触发。但当触发器改变状态时它不会触发。
编辑:2009 年 12 月 4 日左右,Salesforce 上有什么变化吗?那似乎是当它停止工作的时候......
有什么想法吗?
So in one part of our customised Salesforce system, the following happens:
- a trigger changes the value of a picklist on a custom object
- a Workflow rule detects that change and fires off an email.
Since about the 4th of December though, it seems to have stopped working.
edit: The Debug Logs show that the trigger is firing and changing the value of the picklist, but no Worflow Rules are evaluated.
The workflow rule is pretty simple, so I don't really understand whats preventing it. The details of the rule are:
Operates on a custom object.
Evaluation Criteria: When a record is created, or when a record is edited and did not previously meet the rule criteria
Rule Criteria: ISPICKVAL(Status__c, 'Not Started')
Active: Yes
Immediate Workflow Actions: an email alert
Edit: The Rule does fire if I manually update the object to set the appropriate status. But it isn't firing when a trigger changes the status.
Edit: Did something change on Salesforce around December 4th 2009? That seems to be when this stopped working ...
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您说“即使通过 UI 进行手动更改,触发器也不会触发工作流程”,我会做出类似的回应...
鉴于您说这个在本月早些时候停止工作,坦白说我很惊讶!我们想要实现这样的目标,大约 10 个月前就已经实现了,但 Salesforce 告诉我们这是不可能实现的;他们喜欢对可能失控并消耗大量 CPU 的进程进行严格控制(由于该产品的多租户性质),因此有严格的调控器限制......
这可能最近发生了变化,当然,我们构建了工作- 绕过限制的回合...
If you had said "the trigger does not fire the workflow, even though a manual change via the UI does", I would have responded something like...
Given that you say this stopped working earlier in the month, I am frankly astonished! We wanted to achieve something like this, would have been about 10 months ago, and Salesforce told us it could not be done; they like to keep tight control over processes that could potentially run away and consume large CPU (because of the multi-tenanted nature of the offering), hence the stringent governor limits...
This may have changed recently, of course, we built work-rounds to get round the restriction...
为了回答我自己的问题......我最终发现了这是什么。
Salesforce 09 年春季工作流程规则和汇总摘要字段评估更新于 2009 年 12 月开始向所有组织推出,并更改了某些工作流程行为。
我们的特殊问题是,我们需要在初始操作之后对单个对象评估工作流两次 - 我们对状态字段进行了一系列更改,需要启动不同的事情。 Spring '09 更新后,仅针对对象上的操作评估工作流一次。
所以,它确实有效,但后来平台发生了变化,它就不再有效了。是时候写一些代码了。
To answer my own question ... I eventually found out what this was.
The Salesforce Spring '09 Workflow Rule and Roll-Up Summary Field Evaluations update was rolled out to all orgs at the start of Dec '09, and changed certain Workflow behaviours.
Our particular problem was that we needed Workflow to be evaluated twice on a single object after the initial action - we had a series of changes to a status field that needed to kick off different things. After the Spring '09 update, Workflow is only evaulated once for an action on an object.
So, it did work, but then the platform changed, and it didn't work anymore. Time to write some code.