Remove Duplicates in Collection in Lightning Flow

by Rijwan Mohmmed
0 comment

Hello friends, today we will discuss Remove Duplicates in Collection in Lightning Flow. Duplicates can be a nightmare when it comes to managing data in Salesforce. They can cause confusion, decrease productivity, and lead to inaccurate reports. Thankfully, the Lightning Flow in Salesforce provides an easy way to remove duplicates from collections.

In Salesforce, duplicates can occur when data is entered or imported into the system multiple times, or when different users create similar records without realizing that they already exist.

Also, check this: Create Datatable in Lightning Flow salesforce

Key Highlights :

  1. Remove duplicates in the collection of flow.
  2. No Set type of collection is available in flow.
  3. Collections are useful for storing and manipulating data in a more efficient way.

Process :

Lightning Flow is a powerful tool that allows users to automate business processes and collect data from users. To remove duplicates from a collection in Lightning Flow, follow these simple steps:

Step 1: First of all create a multi-select picklist named: “Type__c” on the Contact object, and put options Test1, Test2. Then create a record trigger flow before insert and before update.

Step 2: Now we will create variables to store the duplicate values. Here we create 2 resources.

Step 3: Now we will add the Assignment element to assign the values in the picklist variable.

Step 4: In this step, we will assign blank values of the Contact field Type__c.

Step 5: Now we will run the loop over the picklist variable, which contains duplicate values and also In this loop I have removed the duplicate values and assigned unique values to the Contact => Type field.

Output :

Reference :

  1. Salesforce Flow

You may also like

Leave a Comment