I want to add custom links to the solutions on the Self-service portal. These links will say "Please indicate if it's an useful solution: Yes / No. I'm wondering if it's possible to add a counter to the solution itself that indicates how many users clicked on "Yes" vs clicked on "No". The standard functionality ("Does this Solution help you answer your question?") on the SSP doesn't give me any indication if the solution is popular or not.
You can't do this I'm afraid. The self-service portal doesn't allow you to publish a form that the user can interact with. The SSP is intentionally very restricted (and not available to new organizations) as there is no charge for a user license.
The best that you can do I would think is embed a couple of links in the solution (yes/no) that point to a visualforce page on an unauthenticated Force.com site, which updates a counter. I've created a basic implementation on my Force.com site and proved that the concept works. The page is:
this simply creates an actionfunction to execute a method in the controller, and appends an onload handler to execute it. Once that has completed the 'saved' message appears.
and the controller:
This pulls the solution id and whether its a yes/no from the URL, locates the solution and updates it. Thus if I hit my page with the URL:
the no count is updated.
There is a security hole here, in that the record is updated without the user taking any action, so this could be used for a Cross Site Request Forgery attack. That said, the worst that can happen is the figures are gamed so its not a huge worry.
You can construct the link as a shortcut to a Visualforce page which the portal users have access to.
Eg a custom URL field on Solution or just a Custom Link, which points to
This page then on load invokes an action method in the controller which increments the count of the solution.
Apperantly this information is visible on solution report (It's only visible there...not on list views, solution page layout or API). It contains 3 fields: "Self-Service Access Count", "Self-Service Answer Count" and "Self-Service Positive Count". However, I'll use the answers suggested above for other improvements in the SSP.