“Sending Email After Adding a Parent Record and All of Its Children”
I executed the instructions below from the Help with a Customer, To Equipment To EquipmentComponent (Parent-Child-ChildOfChild) relationship. See my “Spec” screen capture
I can see that the Status is set, but I cannot see the Workflow firing in my Audit History and thus do not
get the Email that the Customer was added See attached screen capture of the Audit History where the Status is set but no Workflow fired
Question: Does this technique below only work with a Parent-Child relationship? Seems I cannot get it working with a Parent-Child-ChildOfChild
“Sending Email After Adding a Parent Record and All of Its Children” Currently, when you add a parent record along with one or more children records, we first add the parent record, and we then add each of the child records. This can make it difficult to trigger a workflow only after all of the child records have been added.
You can can use the following technique to ensure that all parent and child records are added before the workflow runs. This technique uses the Form Saved event to trigger a Data Change action. The Data Change action sets the value of a Status column to a specific value. The workflow rule’s Condition, triggers the workflow rule when the Status column contains that specific value.
Do this as follows: Add a Status column to the parent record. This Status column indicates whether the workflow rule should fire. The Status column can be a simple text column. Assign this column an InitialValue that indicates that the workflow rule should not fire. For example, you might set the Status column’s value to blank. Create a Data Change action to update the Status column’s value. Set the column’s value to the value that triggers the workflow rule. For example, you might set the Status column’s value to “Run”. Go to the parent form. Set its “form saved” event to invoke the Data Change action. Configure your workflow rule. Set the workflow rule’s “Update event” to fire on updates. Set the workflow rule’s Condition to check the value of the Status column. For example, you might specify the Condition:
[Status] = “Run” To make the workflow only fire once, you can replace the single Data Change action with a Composite Action. The Composite Action would invoke the first Data Change action to set the Status column’s value to “Run”, and the second Data Change action to clear the Status column’s value to blank. These two Data Changes will come in as separate updates. The first update fires the workflow rule, while the second update prevents further updates from firing the workflow rule.