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
iloilo 

Tracking Lead Status: Passed in Accounts

Hello all!

 

I have no experience with Apex codes or Triggers, so I do not know if what I am asking is more complex for the those Apex minded than I know of.

 

What I would like to do seems simple minded: To track all Leads with the Lead Status "Passed" as the custom field type 'Leads Passed to date' in Accounts.

 

If anyone is able to direct in how to achieve this, I would greatly appreciate it!

 

 ilona *:) 

jkucerajkucera

How would you know which leads should be connected with which accounts?  Company or after lead convert?

 

If you use Lead Convert, you can create a custom formula field on Lead called something like Lead Status Copy with a formula of:

 

LeadStatus

 

Then you can map that field to an Account Custom Field called Lead Status so that when leads are converted, the account they are converted to gets that custom field.

 

If you are trying to use Lead.Company to figure out which Account and dont' want to wait until lead convert, you can create a trigger to update the first account whose name matches Lead.Company with Leads Passed Date.

 

However, I wouldn't advise any of this as if you have more than 1 lead per account, you'll continually overwrite this field on Account.

iloilo

Thanks John. 

 

My company does not use SF in the traditional manner. We are an outsourced BD company and cold call out of our leads to find opportunities for our clients (aka Accounts).

 

In efforts of tracking our performance for each account, I was hoping to find a way to automically update the numbers of Leads we pass (Lead Status: Passed), within a custom account field.

 

As many of our leads can be called into for different clients/accounts, we use 'Lead Record Type' to specify which account the lead is associated with. 

 

Im thinking that based off my lack of Trigger knowledge, a manual update may be my best option?

 

ilona 

jkucerajkucera

The quickest & easiest way would be to create a custom field on Lead that looks up to Account.  That Account field would be manually updated with the "client" that lead is passed to.

 

Then in reports, you could create a report to group by account, and see the # leads passed to that account.  Then you could use this to populate a dashboard showing the # leads by account.

 

It wouldn't be a persistent number on the Account itself, but is a no code solution.

 

To make that number appear on Account itself, you'd still use the Account custom field on lead & manually enter it, and then you'd need to create 2 triggers:

1) Increment a custom field on Account "# Leads Passed" by 1 every time a new lead is associated with this account

2) Decrement the custom field on Account "# Leads Passed" by 1 every time the lead is dis-associated with the account, or the lead is deleted.

 

Side note - sounds like you are creating 1 lead record type  per account, which likely will not scale very well in the future so the above process without record types will hopefully work better.