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
RadagastRadagast 

"Number of Leads" field

Is it possible to create a lead field -- either through the UI or with Apex* -- that would show the number of all other unconverted leads with the same domain name in the email field? I don't want to de-dupe these leads, just for each lead to show how many leads from the same company exist.

Aside from the conversion status, I would possibly need to filter on Lead Status and Last Modified Date.
 
Thanks for any help!
 
*Unfortunatley, I know nothing about Apex except having done the "Hello World" exercise.
JeremyKraybillJeremyKraybill
Hi there, sure this is possible through Apex. You would probably do it via an insert & update trigger on lead, which would look through all leads with the same email domain, total them, and set the field on the current lead. If it's vital to have it up-to-date on all leads (probably is), you would also need that trigger to update the other leads from that domain.

If you have only done the hello world exercise, and aren't really a programmer, you probably should find someone to help you with it. It's probably under a couple hours work for a good Apex person.