It's All Writing.

Writing makes you happy.

How to detect leads which has the same name at Salesforce by node



We can't solve this problem with using report. So, I'll show you the solution which using node ( with jsforce and lodash ).


Code's Summary

The summary of the process is as follows.

  1. login your organization
  2. retrieve full leads with full fields ( See also: How to get Salesforce sObject's fields information by node - It's All Writing. )
  3. group the leads by lead's name
  4. count each group's element. If the count greater than 1, the group is the same name group.
  5. print the same name group informations ( Id, Name, Email and Company on CSV format ).