You need to sign in to do that
Don't have an account?
Execute case comment Edit button from overriden Case Comment Related List
Hi,
I overrode my CaseComments related list on the Case page layout due to comments customization needs:
VForce Page
<apex:page standardController="Case" extensions="CaseCommentRelatedListExt">
<apex:pageBlock >
<apex:pageBlockTable value="{!Case.CaseComments}" var="c">
<apex:column headerValue="CC">
<apex:form >
<apex:inputField value="{!c.IsPublished}"/>
</apex:form>
</apex:column>
<apex:column headerValue="Date" value="{!c.createddate}"/>
<apex:column headerValue="Created By" value="{!c.CreatedById}"/>
<apex:column headerValue="Comment" value="{!c.CommentBody}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
Even though this is great, I lost some of the standard functionality of CaseComments such as the edit, delete buttons
Is there a way I can call this functionalities from vforce without writing my own Case Comment edit page?
Thank you very much
Well, its the link that is blocked thats y I cant see the image :smileysad:
You can mail me the screenshot at rajesh.jshah@tcs.com.
I had this component and History component written a month back. Always thought of posting them but never did. Today when I saw your post, finally posted both of them.
All Answers
I too have overridden the case comments with my own page block table. I then implemented the existing functionalities using the following code
<apex:column headerValue="Action"> <apex:outputLink value="/{!comment.cComment.Id}/e?parent_id={!caseId}&retURL=/{!caseId}">Edit</apex:outputLink>  |   <apex:commandLink action="{!deleteComment}" value="Del"> <apex:param name="CommentId_d" value="{!comment.cComment.Id}"/> </apex:commandLink>  |   <apex:commandLink action="{!makePublicPrivate}" value="{!comment.PublicPrivateAction}"> <apex:param name="CommentId_p" value="{!comment.cComment.Id}" /> </apex:commandLink> </apex:column>
For edit, I am calling the standard Salesforce edit page with retURL of my Case Detail page.For delete and Make Public/Private, I had to write my own function.
Hope this helps
Yes it does help. Thank you very much.
Since you've done the some customization as I am currently doing, another question for you.
I added my vforce page.....pasted above to the case detail page to acheive the effect or related list for my case comments and everything works good besides the fact the if I have more comments not all of them show, because the section area is limited on height.
Any Ideas on this one
Also i tried to attach a screen shot on the rendering problem I am experiencing:
I am not able to see the screenshot (blocked here for some reason).
I dont understand completely when you say that section height is limited. Can you please explain in detail?
You can also see the screenshot here: http://www.7ticks.com/experimental/sf_screenshot.png
I will try to explain in more detail:
1) I have my visual force page with the related list of case comments.
- the visual force page is added to my case page layout
(I added it as a section so if you go to page layout you drag and drop a section name it my comments and there I added my case comments vforce page)
Here is the issue I am having:
If I have only one or two short comments it renders ok on the page. However if I add more comments and the text is more anything inserted after the allowed space on the section will not show on the page and will be truncated.
Hopely wit this explanation and the screen shot I will be abel to explain my problem.
Thank you very much, btw I am also trying to incorporate your case comments component which is great.
Well, its the link that is blocked thats y I cant see the image :smileysad:
You can mail me the screenshot at rajesh.jshah@tcs.com.
I had this component and History component written a month back. Always thought of posting them but never did. Today when I saw your post, finally posted both of them.