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

Custom Ideas Visualforce page - "Promote/Demote" code

Hello all,


I am currently re-vamping our Customer Portal and creating custom Visualforce pages for Cases, Ideas, etc. I was able to create the Case page and controller with no problem. I am also able to create the Ideas page and controller.


The one major issue I am having is that I am not sure how to "re-use" the Promote and Demote functionality. Does anyone have any experience with re-using this functionality in a custom Visualforce page? I want to give users the ability to vote on an Idea....but only one time per user....same as current functionality.


I know the functionality is in the ideaList.apexp page, but I don't know how to re-purpose it in my own page.







I have the same requirement.


did you get that solved?


if Yes please share with me



Did you guys figure out how?
Sakthivel NSakthivel N

Hey guys, You can use Vote object to achieve this.
Vote v = new Vote();
v.ParentId= '083540000008bNSAAY'; //Idea Id
v.Type = 'Down';
insert v;