
I have created a Process builder that On creation of an Account, Contact will get created. and criteria is created and edited every time. but every time I'm updating it is creating new Contact rather updating the record. what should I do that if contact is already exist then just update? which condition should i write?
6 Antworten
Ok, so first create a checkbox field on Contact and call it "Created by PB". Make sure it is false by default
Now create a text field on account and call it "Contact ID". Both fields don't need to be on the page layout. You can also change the names if you want.
Now go to your PB.
In the first criteria node, add a line to say that says "Contact ID" IsNull equals TRUE
In the action that creates the contact, add a line to set the checkbox to TRUE
Add a second node to your PB and as a criteria, write ContactID IsNull equals FALSE
Add a field update as an action to update the contact as you need
Create a second PB, on Contact this time
Your criteria should be "Created by PB" equals TRUE
Add an action to update records, select records related to the contact and choose Accounts
Update the "Contact ID" text field on account with the Contact ID ("Contact ID" - Field Reference - ID)
Make sure you activate both PBs