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
kingkong94538kingkong94538 

How to use Lead Owner Name without using a trigger

Background: 

Assigning a lead to a sales rep, changes the lead owner to sales rep name automatically.

If a sales rep changes the lead status to Unresponsive, the lead goes back into queue and the queue becomes the lead owner.

 

Issue:

I need to create a report that shows how many leads are assigned to each sales rep in a month (lets say).

 

My Solution/ Workaround:

To solve this, I created  a custom field Most Recently Assigned Sales Rep in Lead object and then set up a workflow that saves the lead owner in this custom field (this is applied when the lead owner is not a queue). When I run the report, I only see the ID and not the actual name of the sales rep. So, I created another field and created a trigger to get the user name based on the id. This works but I'm not sure if this is the best way...

 

Any feedback: