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
Sascha LöfflerSascha Löffler 

Process Builder - Error after import

Hi together, 

i have a process builder process for contacts to create a junction object record between contacts and custom object. For the Junction Object i created also a workflow to prevent them from creating duplicates like explained here: https://salesforce.stackexchange.com/questions/12755/how-to-apply-uniqueness-on-junction-object

Now i will update for example 50 contact records through an import and for all of them a junction record will be created through the process builder, if there is no duplicate it works fine, but if it founds only one junction record duplicate through the workflow it will fail also for all other records.

Hope you understand my question and can help me out of that. 

Best regards
Sascha
GauravGargGauravGarg
Hi Sascha,

I can try this implementation with Code development. As salesforce didn't have configuration solution to avoid duplicate error on process builder. 

Thanks,
Gaurav
Skype: gaurav62990
Gaurav HandooGaurav Handoo
Hi Sascha

The reason for your Process Builder failing in case of duplicate record is that there is no check to restrict the Process Builder from creating a new record even though the duplicate record is existing. Creating a unique field will throw a validation whenever same value (for some other record) is getting updated in that field. I would require following inputs to recommend you with a solution:
  1. Confirmation on whether the Junction object is to be created on update of Contacts or just the creation.
  2. Unique field critieria (Workflow formula used to create unique field).
  3. Critieria of picking up Object B, while creating record in Junction Object.
I believe, this might not be possible through Process Builder (however, we can still give it another shot), instead recommendation here would be to use Visual Workflows to achieve the same.

In case you feel like having a detailed discussion on the same, please feel free to connect me at gaurav.handoo@gmail.com.

Cheers!!

Gaurav
 
Sascha LöfflerSascha Löffler
Hi Gaurav, thank you for your great reply. 1. The Junction object is to be created on update and creation. 2. Unique ID Field: Set to Unique, Case Sensitive and External ID Workflow Rule: Evaluate the rule when a record is created, and every time it's edited Rule Criteria: TRUE Action: Field Update, to Set Unique_ID__c to set “Kontakt__r.Id & " - " & Warengruppe__r.Id” 3. Critieria of picking up Object B, while creating record in Junction Object. [Contact].Warengruppenzuordnung_ID__c ISNULL = false So the flow is the following: 1. Upsert Contacts 2. Process Builder looks if [Contact].Warengruppenzuordnung_ID__c ISNULL = false 3. Trigger the process to create the Junction record with contact id and [Contact].Warengruppenzuordnung_ID__c 4. Triggers the workflow to set Unique ID for Junction Record Thank you very much in advance for your help. Best regards Sascha
Gaurav HandooGaurav Handoo
Hi Sascha

I believe this is not possible through Process Builder, however, same can be done through Visual Workflows. Would it possible for you to connect with me at gaurav.handoo@gmail.com.

I would prefer having a screen share session to conclude the same at the earliest.

Cheers!!

Gaurav