You need to sign in to do that
Don't have an account?
Help custom controller
Hello,
I am trying to create a page where users are able to vote to go on with a project or not. I looked at ideas, but that doesn't cover it for us.
So I am trying to make it myself. I have made a custom object Vote with a master-detail towards projects.
People are also able to make comments without voting, however they are only allowed to vote once! This is where the problem hits.
There is a picklist vote__c with the options None, Yes, No. If that user has made an earlier entry Yes or No he/she must not be allowed to vote! So in this case a boolean Able-vote (or something) must be set to false. So I can use this in the apex code!
I have not much experience with custom controllers, hope to in the future.
Thanks
Jeroen
example:
ProjectVote object has the following fields:
- ProjectId
- UserId
- VotePickList
When a user loads your Vote Visualforce page, do a little SOQL to find out if the user have his vote in already or not, if yes take away the voting option and just show want his vote was or you may want to allow the user to change his/her opinion... whatever your requirement is.Hi Sam,
Thanks, I will give this a try! Might get back to you.
Jeroen:smileyvery-happy: