You need to sign in to do that
Don't have an account?
Mohit S.
'New' Command button on VF page not opening new VF page on Case detail page
On the CASE object detail page, I have created a Case Comments VF page (Secure_Message_Comments_VF) as a component on Case object detail page. The 'New' button on this VF page should open the 'Case Comment Edit' page (NewCaseComments_VF) on Case detail page itself, but it is opening the 'Case Comment Edit' page within that component instead. Below is the command button VF code. Please advise.
<apex:page standardController="Case" extensions="CaseCommentRelatedListExt">
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons location="top">
<apex:commandButton value=" New " action="{!"/apex/NewCaseComments_VF"}" />
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!Case.CaseComments}" var="c">
<apex:column width="28%" headerValue="Date" value="{!c.createddate} ({!c.CreatedBy.Name})" />
<apex:column headerValue="Comment" value="{!c.CommentBody}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
Do I need to specify parent_id of the case or anything else? Please help with the solution.
<apex:page standardController="Case" extensions="CaseCommentRelatedListExt">
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons location="top">
<apex:commandButton value=" New " action="{!"/apex/NewCaseComments_VF"}" />
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!Case.CaseComments}" var="c">
<apex:column width="28%" headerValue="Date" value="{!c.createddate} ({!c.CreatedBy.Name})" />
<apex:column headerValue="Comment" value="{!c.CommentBody}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
Do I need to specify parent_id of the case or anything else? Please help with the solution.
<apex:page standardController="Case" extensions="CaseCommentRelatedListExt">
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons location="top">
<apex:commandButton value=" New " action="{!"/apex/NewCaseComments_VF?parent_id={!case.id}"}" />
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!Case.CaseComments}" var="c">
<apex:column width="28%" headerValue="Date" value="{!c.createddate} ({!c.CreatedBy.Name})" />
<apex:column headerValue="Comment" value="{!c.CommentBody}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
Please let us know if this will help you