function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
HayaHaya 

Need a way to send a user to another vf page

I have a vf page that lists records for a specific user.

I want to add an option to update a specific record.

I think  I know how to set the form to update the record.

 

What I don't know how to set up is the button that would send the user to the next form to edit the record chosen.

 

 

This is my code:

 

 

<apex:page standardController="Case" extensions="RequestViewExtension" >
<apex:stylesheet value="/resources/ForteStyles.css"/>

<apex:pageBlock >
<apex:form >
<html>
<div>
<apex:repeat value="{!cases}" var="s">
<hr />
Hello {!$User.FirstName}!
<div style="clear:both;width:500px; height: 50px;">
<p style="font-size:1.2em; text-align:right; color: #1fbdf2; float:left; width: 30%;"> Request Number:</p>
<p style="font-size:1.2em; text-align:left;color:black; float:left; margin-left: 15px; width: 50%;"> {!s.CaseNumber}</p>
<div style="clear:both;">
</div>
</div>
<hr />
<div style="clear:both;width:500px; height: 50px;">
<p style="font-size:1.2em; text-align:right; color:#1fbdf2; float:left; width: 30%;"> Subject:</p>
<p style="font-size:1.2em; text-align:left;color:black; float:left; margin-left: 15px; width: 50%;">{!s.Subject}</p>
<div style="clear:both;">
</div>
</div>
<hr />
<div style="clear:both;width:500px; margin-bottom:20px; ">
<p style="font-size:1.2em; text-align:right; color:#1fbdf2; float:left; width: 30%;">Description:</p>
<p style="font-size:1.2em; text-align:left;color:black; float:left; margin-left: 15px; width: 60%;">{!s.Description}</p>
<div style="clear:both;">
</div>
</div>
<hr />
<div style="clear:both;width:500px; height: 50px;">
<p style="font-size:1.2em; text-align:right; color:#1fbdf2; float:left; width: 30%;">Create date:</p>
<p style="font-size:1.2em; text-align:left;color:black; float:left; margin-left: 15px; width: 50%;"> {!s.CreatedDate}</p>
<div style="clear:both;">
</div>
</div>
<hr />
<div style="clear:both;width:500px; height: 50px;">
<p style="font-size:1.2em; text-align:right; color:#1fbdf2; float:left; width: 30%;">Request Owner:</p>
<p style="font-size:1.2em; text-align:left;color:black; float:left; margin-left: 15px; width: 50%;"> <apex:outputField value="{!s.Ownerid}"/> </p>
<div style="clear:both;">
</div>
</div>
<hr />

</apex:repeat>

</div>
</html>
</apex:form>
</apex:pageBlock>
</apex:page>

 

HayaHaya

i am trying to use actionFunction.

 

 

<apex:actionFunction action="{!requestComment}" name="requestaddComment"  reRender="none">
</apex:actionFunction>

 

I created a page requestComment.

 

I am getting:
Error: action="{!requestComment}": Unknown method 'CaseStandardController.requestComment()'

 

souvik9086souvik9086

What is your controller? You do not have that method in the controller requestComment. Check that,

 

If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.

Thanks

 

HayaHaya

I am trying to create a button that the user can press to go to another page where he can update the record.

I got to the present case by sending the case number so I imagine it's still an available  variable to send to the next page. I don't know how to go about doing that.

 

I created a requestCommentController in the Apex Classes library (it's not doing anything right now).

 

I am getting the error message:

 

Error: action="{!requestComment}": Unknown method 'CaseStandardController.requestComment()'

 

I am new to this and need more details. I am very baffled by this.

 

Thank you