I want to override the case comment new to visual force page for saving the comment.

Is it possible to override the new button ?

Please help me out from this.

Thanks, Suresh.

2 Answers 2


However, you can create a visualforce case detail page and then customize the case comment section according to your business requirement.

Below is the VF component for the New Case Comment:

 <apex:componentBody >
    <apex:form >
        <apex:pageBlock title="Case Comments" >
            <apex:pageBlockButtons location="top">
                <apex:commandButton action="{!NewComment}" value="New"/>
            <apex:pageBlockTable value="{!Comments}" var="comment"> 
                <apex:column headerValue="Action"> 
                    <apex:commandLink action="{!EditComment}" value="Edit">
                        <apex:param name="CommentId_d" value="{!comment.cComment.Id}"/>
                <!--  <apex:commandLink action="{!deleteComment}" value="Del">
                        <apex:param name="CommentId_d" value="{!comment.cComment.Id}"/>
                    </apex:commandLink>&nbsp; | &nbsp; 
                    <apex:commandLink action="{!makePublicPrivate}" value="{!comment.PublicPrivateAction}">
                        <apex:param name="CommentId_p" value="{!comment.cComment.Id}" />
                    </apex:commandLink> -->
                <apex:column headerValue="Public" value="{!comment.cComment.IsPublished}" />
                <apex:column headerValue="Comments">
                    <apex:outputText escape="false" value="{!comment.commentText}"/>

Please upvote if this helps you!!


Unfortunately you cannot override new case comment button. Please upvote this idea so that salesforce allow this feature soon. https://success.salesforce.com/ideaview?id=08730000000IBFrAAO

Or else you can create a new case comment custom object and override the button with vf page.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .