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
SHC @ BCSHC @ BC 

Contact field to show count of Opportunities

I'm looking for a way to add a field to Contacts that provides a count of all 'won' opportunities that that contact is associated to as primary contact. I now I can't use roll-ups as Opportunity is not a child of Contact. SF suggested I use an S-Control, but I don't have the skills to create one. Has anyone tried to do anything like this already, and if so how does it work (new tab?, etc)?
TCAdminTCAdmin
Hello SHC @ BC,

Yes, your only option is to utilize an s-control to do this. You may be able to find an example in the Cookbook. You can also go to the developer boards and the AJAX Toolkit & S-controls line which should have several examples that may be easy to modify. If that doesn't give you enough information you can email and we can see if we can come up with an agreement.
JakesterJakester
I wouldn't say the "only" option is an s-control. If you have Enterprise or higher edition, a Trigger would work and wouldn't require pushing a button in order to update the count.