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
Btuitasi1Btuitasi1 

How to make a html button promote an Idea and vice versa

I have two buttons:
<a class="btn-lg btn-data" role="button">Vote Up</a> <a class="btn-lg btn-data"  role="button">Vote Down</a>

I need the "Vote Up" button to promote the Idea displayed on the page and the "Vote Down" button to demote the Idea.

Alternatively, I could just link the two buttons to custom number fields that would add 1 to an Up Vote field and vice versa, but I don't want users to be able to vote twice on the same Idea.

Any ideas on how to implement either? I'm fine with going the 2nd second route since it seems like an easier option. I'm still a novice when it comes to Java.

Thanks!
 
ShashankShashank (Salesforce Developers) 
You may find this helpful: https://developer.salesforce.com/forums/?id=906F0000000AowaIAC