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
Arash RahnArash Rahn 

Automatically Create contact for the account

Hi,
User-added image
User-added image
We have some accounts that start with "Business". And we already recorded their information in custom fields in the account object. Business first name, business last name, and email respectively. How can I build an automation to create a contact for that account?
I followed steps in the picture. When I activate the process, the contact is created; however, I receive the email Error Occurred During Flow. DUPLICATES_DETECTED: You're creating a duplicate record.
ShirishaShirisha (Salesforce Developers) 

Hi Arash,

Greetings!

Seems like you have duplicate rules enabled on the Object on which you are trying to create the record due to which the process builder sending you an error notification because it can't be handled by the process builder.

We have an existing Idea created for this limitation below:

https://trailblazer.salesforce.com/ideaView?id=08730000000DrluAAC

So,I would suggest you to go with the flow+process builder to avoid creating the duplicate records abd please refer the below blog for the sample flow:

https://www.auraforce.ca/2015/02/avoid-duplicate-records-using-visualflow.html

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri

Arash RahnArash Rahn
Hi Shirisha,

I do not think the problem is duplication rule. For example, if I deactivate the process builder and manually create a contact for that account, I do not see any error message regarding the duplication. So, I guess, duplication rules are okay. And by the way, why it gives me the duplication message error? In fact, I am not trying to create any duplicate. What is your idea?