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
cpocpo 

Problems with adding a comment to an Idea using IdeaComment

Hi,

 

I am having some trouble adding a comment to an Idea object. I assumed that you could simply reference the IdeaComment standard controller and do a save() to insert a comment but this does not seem to be working, here is my code:

 

<apex:page standardController="IdeaComment">
 <apex:form >
     <apex:pageBlock title="Add Comment" mode="edit">
      <apex:pageBlockButtons >
        <apex:commandButton action="{!save}" value="Save"/>
      </apex:pageBlockButtons>
      <apex:pageBlockSection columns="2">
        <apex:inputField value="{!IdeaComment.CommentBody}"/>
      </apex:pageBlockSection>
    </apex:pageBlock>
</apex:form>
</apex:page>

 

Also, here is a sample page URL that I am using too: communityIdeaAdd?IdeaId=087S00000008VAbIAM

 

Any help would be really greatly appreciated.