I have an object called Closings that signifies when a purchase is completed. When a purchase is completed the status of the Closing is set to "Exchanged".

I want to create a field within the Contact object that is updated by the Process Builder to count the number of Closings that are set to exchanged. If the number of "Exchanged" closings is greater than 1 then it will set the value of the field to "Multiple Purchaser" if the exchanged closings value is 1 then it will set the value of the field to "Single Purchaser".

Is this possible through the process builder and if so how ?

  • You should be able to implement such logic with combination of process builder that invoke flow. Just keep in mind that you cannot invoke process builder on delete action, only on create/update.
    – Liron C
    Sep 15 '20 at 11:37

Making a flow using process builder alone will not allow you to count the number of sibling closing records under a contact. Also, it wouldn't cover the scenario whereby a closing record is deleted.

You could use a rollup summary field if you can change the lookup on Closings up to Contact into a master-detail relationship. Otherwise other options include writing a trigger or using Flow Builder.

Flow Builder (Setup -> Process Automation -> Flows) has come quite a long way and has introduced a declarative way to execute logic before/after record events (create, edit, delete), much like triggers, since Summer 20. You can use that to design an automated process to keep the counter on the parent contact record up to date when child closing records change.

Example: A counter is updated on a parent account after a child account is create or updated and meets certain conditions. This can be replicated for delete events (edit: as of Winter 21 - @cropredy).

enter image description here

  • 2
    until Winter 21 is released with Flow support for deletions, this won't work if the child record is deleted as the Flow won't be triggered
    – cropredy
    Sep 15 '20 at 16:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.