Code for Cookies
August 23, 2010 4 Comments
I’m not above bribery.
Earlier this month I had a really pressing need for a count of all Activities related to a given Opportunity. My goal was to use this count as part of a calculation for prioritizing Opportunities.
Well, it turns out, us button-click-admins can’t do that kind of thing within Setup. You have to be able to code a trigger. Boo!
So, I put my thinking hat on. What motivates coders? Food! Specifically baked goods!
I posted this in the Salesforce Community on 8/3/10:
I would like to have a field on Opportunities (for now, Cases later) that is a count of Activities. I know this isn’t possible via the UI, but I’m hoping some generous coder out there will take pity on me and share the appropriate code.
I’m happy to bribe you with baked goods if that will help. 🙂
Thanks!
Amber
Ten short days later my plea was heard by Kevin Swiggum. He wrote a fantastic blog post with the helpfully commented code, enlightening commentary and, best of all, the triggers are bulkified! Swoon!
And all for the love of chocolate chip cookies!
Pingback: Packing list for Dreamforce ’10 « Amber Neill – Salesforce Administrator
Oh no way!!! I am so stoked to hear this! I need that too. I am totally going to bring him some cookies at DF10 also. Nice blog, btw, this is my first visit.
Thanks Brandy! Please come back often! 🙂
Pingback: 2010 in review « Amber Neill – Salesforce Administrator