Revision: 30009
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at August 6, 2010 02:55 by d3developer
Initial Code
public List<Recommendation> getRecipeEightTopPosters()
{
List<AggregateResult> results = [
SELECT ParentId pid, Parent.Name pname, COUNT(id) fcount
FROM UserFeed
WHERE Type='UserStatus'
AND CreatedDate = THIS_WEEK
GROUP BY Parent.Name, ParentId
ORDER BY Count(id) DESC LIMIT 10];
List<Recommendation> top = new List<Recommendation>();
Recommendation r = null;
for (AggregateResult ar : results)
{
r = new Recommendation();
r.count = ar.get('fcount') + '';
r.name = ar.get('pname')+'';
r.entityid = ar.get('pid')+'';
top.add(r);
}
return top;
}
Initial URL
Initial Description
Initial Title
@cloudcoder Get Chatter Top Posters
Initial Tags
Initial Language
Other