function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kjunkjun 

Process Builder Creating a new record but wanting to restrict to only 1 record to be created

I've created a process builder flow that creates a child record when a certain stage is selected on the Opportunity record. I want to avoid having multiple child records created if one already exists. 

Here is a screenshot of the criteria I used to trigger the action:
Define Criteria Screenshot (https://www.screencast.com/t/Zisb0hjd0SI)

1. [Opportunity].StageName = "Financial Interview"

I believe I need to add another condition to check if a Financial_Interview__c record exists, do not execute this action. 

Thank you in advance. 
TechingCrewMattTechingCrewMatt
Hello, I think there are three ways to achieve the functionality you're looking for:
  1. Use a Flow instead of Process Builder because Flows can search for related records
  2. Use a Trigger instead of Process Builder becuase Triggers can search for related records
  3. Change Financial_Interview__c from a Looup to Master-Detail Relationship (if it isn't already) and create a Rollup Summary Field that counts the number of Financial Interviews that are related to each Opportunity. You can then use that a criterion before creating records in the Process Builder.
Thanks,
Matt