You need to sign in to do that
Don't have an account?
Btuitasi1
How to display number of record entries per user
I have a visualforce page that acts as a leaderboard for users. I would like the ability to show how many submissions a user has for the Idea sObject and how many times he/she has voted on any idea. How would I develop this in my custom controller?
Thanks!
Thanks!
where 'xxxxxx' is the user's id (in your controller you can use Userinfo.getUserId() to get the current user's Id and where 'yyyyyyyy' is the RecordTypeId of the Ideas you want to count
If you want to do more of a leaderboard style thing you could get the top 10 most voting users
where 'yyyyyyyy' is the RecordTypeId of the Ideas you want to count
Unfortunately there is an Implementation restriction on querying the Vote object that it must be filtered by either ParentId, Parent.Type or Id
Where would I find the RecordTypeID of the ideas I want to count?
I think you may have to use Parent.RecordTypeId instead of Type, but I may be wrong. I've never used the Idea or Vote object