0

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.

1

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:pageBlockButtons>
            <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>
                <!--  <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>
                <apex:column headerValue="Public" value="{!comment.cComment.IsPublished}" />
                <apex:column headerValue="Comments">
                    <apex:outputText escape="false" value="{!comment.commentText}"/>
                </apex:column>
            </apex:pageBlockTable>
        </apex:pageBlock>   
    </apex:form>    
</apex:componentBody>

Please upvote if this helps you!!

| improve this answer | |
0

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.