我必须有两个具有主细节关系的对象。如果任何一个对象(父对象或子对象)发生任何更新,我希望更新父对象中的状态选择列表字段。什么是最好的方法?
发布于 2022-04-04 14:41:37
希望这有助于您了解各种可用的解决方案。我已经通过最简单的工作流更新将它们排序给更复杂的流程构建器和最后一个顶级触发器,这与在salesforce上实现解决方案时单击代码的最佳实践产生了共鸣。
您可以在这里使用许多策略,下面我将从简单到复杂(过度杀戮)对它们进行概述:
- one on the parent object when a record is edited,
then update the status picklist field on the record .
- and another on the child object when a record is edited,
then upon selecting `field to update` as option, you will
be given the parent object and child object as options to
filter fields on, select parent object to filter fields on
then select the status picklist field from parent object.Create a process builder flow on child object and update parent
object along with either of the two:
- create a workflow on the parent object to update the status
picklist field when a record is edited only.
- or alternatively to the workflow on the parent object, create
a process builder flow on parent object and update parent object.Equally you can go to the lengths of writing an apex trigger
upon the parent object `onupdate` trigger and verify if a valid
change was made(meaning the change made to parent was not a
change on the status picklist field), update the the status
picklist field too.https://stackoverflow.com/questions/68688372
复制相似问题