You need to sign in to do that
Don't have an account?
OPPORTUNITY Won/Lost Statistics for User
Hey guys,
I want to track how many opportunities each sales user has lost/won. My end result looks like this:
Name | Won | Lost
ABC 23 67
XYZ 12 35
...
My own idea is to create two custom number fields Opps_Won__c, Opps_Lost__c for the object user.
Everytime an opportunity's stage is changed to Won/Lost a trigger fires and increases the number in the corresponding custom field of the opportunity's owner.
I could also get the won/lost counts with a SOQL query for each sales user, but then I would get in conflict with the Salesforce.com query limit, because I want to have an overview over all sales users and I have a lot of sales users....
Any other ideas how I could realize this?
Ok, pretty simple.
I can get the needed data with 1 SOQL query: