• Iswarya Sekar
  • NEWBIE
  • 20 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 7
    Replies
<apex:page standardController="Case" extensions="newClass" showHeader="false" >
    <apex:form >
        <apex:pageBlock title="Case Status">
            <apex:pageBlockSection columns="1">
                <apex:inputField value="{!Case.Status}"/>
                <apex:inputField value="{!Case.Reason}"/>
                <apex:inputField value="{!Case.Priority}"/>
            </apex:pageBlockSection>
            <div>
                <apex:commandButton action="{!redirectToMyVF}" value="CloseCase"/>
            </div>
        </apex:pageBlock>
    </apex:form>
</apex:page>

My page1


<apex:page standardController="Case" extensions="Displayrecord" showHeader="false" >
    <apex:form >
        <apex:pageBlock title="Case Status">
            <apex:pageBlockSection columns="1">
                <apex:inputField value="{!Case.Status}"/>
                <apex:inputField value="{!Case.Reason}"/>
                <apex:inputField value="{!Case.Priority}"/>
            </apex:pageBlockSection>
            <apex:pageBlockButtons>
                <apex:commandButton action="{!save}" value="Save"/> 
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>

My page 2


public class newClass {
    public newClass (ApexPages.StandardController Cases) {
    }
    public PageReference redirectToMyVF() {
        PageReference pref = new PageReference('/apex/Page');
        pref.setRedirect(true);
        return pref;
    }
    public PageReference save() {  
        try{
            update this.Cases;
        }catch(exception e){
        }
        PageReference page = new Pagereference('/apex/Case_page?Id='+Case.Id);
        page.setRedirect(true);
        return page;
    }
    
}

my apex class

Please help me
<apex:page standardController="Case" showHeader="false" >
    <apex:form >
        <apex:pageBlock title="Case Status">
            <apex:pageBlockSection columns="1">
                <apex:inputField value="{!Case.Status}"/>
                <apex:inputField value="{!Case.Reason}"/>
                <apex:inputField value="{!Case.Priority}"/>
            </apex:pageBlockSection>
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" value="save"/> 
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>

when giving reason and status for the case object and saving it. this saved record should be displayed in another new VF page
<apex:page standardController="Case" extensions="newClass" showHeader="false" >
    <apex:form >
        <apex:pageBlock title="Case Status">
            <apex:pageBlockSection columns="1">
                <apex:inputField value="{!Case.Status}"/>
                <apex:inputField value="{!Case.Reason}"/>
                <apex:inputField value="{!Case.Priority}"/>
            </apex:pageBlockSection>
            <div>
                <apex:commandButton action="{!redirectToMyVF}" value="CloseCase"/>
            </div>
        </apex:pageBlock>
    </apex:form>
</apex:page>

My page1


<apex:page standardController="Case" extensions="Displayrecord" showHeader="false" >
    <apex:form >
        <apex:pageBlock title="Case Status">
            <apex:pageBlockSection columns="1">
                <apex:inputField value="{!Case.Status}"/>
                <apex:inputField value="{!Case.Reason}"/>
                <apex:inputField value="{!Case.Priority}"/>
            </apex:pageBlockSection>
            <apex:pageBlockButtons>
                <apex:commandButton action="{!save}" value="Save"/> 
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>

My page 2


public class newClass {
    public newClass (ApexPages.StandardController Cases) {
    }
    public PageReference redirectToMyVF() {
        PageReference pref = new PageReference('/apex/Page');
        pref.setRedirect(true);
        return pref;
    }
    public PageReference save() {  
        try{
            update this.Cases;
        }catch(exception e){
        }
        PageReference page = new Pagereference('/apex/Case_page?Id='+Case.Id);
        page.setRedirect(true);
        return page;
    }
    
}

my apex class

Please help me