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
jeroenjeroen 

Customizing Ideas object. Restrict voting

Hello,

 

I would like to customize the Ideas object. I would like certain users to be able to vote and others only be able to view the ideas. I am somewhat familiar with apex code and visualforce pages, I have tried creating a VF page with a standard controller Idea.

 

<apex:page standardController="Idea" showHeader="true" > <apex:detail relatedList="true" title="true" relatedListHover="true"/> <apex:relatedList list="Votes"/>

</apex:page> 

 

I can not get any related list in view. Like Votes or Comments, they are listed in the WSDL. I thought I could do a check if the user has a certain profile, than he/she would be allowed to vote otherwise only view. 

 

Is there anyone who can shed some light on this?

 

Thanks

Jeroen 

jeroenjeroen

I have continued creating the custom page, but are running into difficulties with the realted list "Comments".

 

Saving this code

 

 <apex:page standardController="Idea" showHeader="true" >

  <apex:detail relatedList="true" title="true" relatedListHover="true"/>
    
  
     <apex:pageBlock id="thePageBlock">
         <apex:form>
             <apex:inputTextarea id="newComm" value="{!Idea.Comments.CommentBody}"/><p/>
             <apex:commandButton value="Create" action="{!create}"/>

         </apex:form>

etc. etc.

 

Gives me an Insufficient privilages error. I am administrator, so I must be doing something wrong. The came after I added action="{!create}

 

If you have any good ideas?

 

Thanks

Jeroen