• cadkinso
  • NEWBIE
  • 0 Points
  • Member since 2005

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

I have a Marketing Coordinator position open in our Seattle office and would prefer someone who has some experience with SFDC.  For more information, please see the jobs board on our corporate website http://www.cray.com/About/Careers.aspx

I have a fairly stright forward problem, but I'm not sure how I should solve it.  Basically, I need a new custom field on the Campaign table that is a count of the number of leads that have a particular status.  Unfortunately, I can't simply create a Roll-Up Summary field on Campaigns, because it's not the master in a master-detail relationship.  In other words, I need a field on Campaigns that is essentially a count of the number of leads associated with that campaign that have a particular status.  How should I approach this?

 

The one possibility that I can see is that I could add a trigger that fires on insert/update/delete of leads that performs the appropriate SOQL query and updates the associated Campaign record(s); however, this seems a bit round-about, and my have to be done for all Campaign records every time that a Lead record is updated.  Is there a better way to do this?

 

Thanks in advance,

Max