用 Workflow/Flow/After Trigger 繞過 Custom Validation 的限制
根據此篇所言 Triggers and Order of Execution
11. Executes workflow rules. If there are workflow field updates:
a. Updates the record again.
b. Runs system validations again. Custom validation rules, flows, duplicate rules, processes, and escalation rules are not run again.
c. Executes before update triggers and after update triggers, regardless of the record operation (insert or update), one more time (and only one more time)
意即在 Custom Validation 做完檢查後,work flow/flow/After trigger才會作動。而且 Custom Validation 不會對這些後發的動作再次檢查。
換句話說如果發現某個 field 的值突破了現行 validation rule的限制,可能是因為
- 在 validation rule 實施前,這個 value 就已經存在了
- 這個值是來自某個自動化流程,例如
- workflow field update
- record-triggered flows that are configured to run before the record is saved.
- After trigger
(寫這篇時一查,才發現好幾個月前也提過類似的事情:
留言
張貼留言