+ Start a Discussion
kminevkminev 

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

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Rajesh ShahRajesh Shah

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

Rajesh ShahRajesh Shah

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>&nbsp | &nbsp <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>

 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

 

 

kminevkminev

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:

 

 

SF Screenshot

Rajesh ShahRajesh Shah

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?

 

kminevkminev

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.

 

Rajesh ShahRajesh Shah

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. 

This was selected as the best answer