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
Jim MontgomeryJim Montgomery 

Create a custom object linked to a newly created opportunity in the same process builder process

I have a process builder process that will create a new opportunity when a checkbox is set to true on the account.
I create the opportunity no problem, but I then want to also create a custom object related to the newly created opportunity as the next action in the process. is this possible?
Gaurav HandooGaurav Handoo
Hi Jim

Yes this is very much possible. All you need to do is following:
  1. Create another process builder which will fire whenever Opportunity is created
    1. This process builder will invoke through your first process builder
  2. Action element of this process builder can be controlled by either of the two ways:
    1. Call a flow which populates the values required for the custom object
    2. Directly create a child object as action element of the process builder (new one)
Having second process builder will help you pass the opportunity Id to the child custom object.

In case this fails, you would need to move the creation of your opportunity as well into a flow, which will follow the below mentioned steps:
  1. Create opportunity (with the values you want to replicate)
    1. If there is only one Opportunity you are going to create, then do a Record Create to capture it's Id in a variable
  2. Create the custom object record with the Created Opportunity's Id and the details you want to capture

Hope this helps.

Cheers!!

Gaurav