+ Start a Discussion
Vimal DVimal D 

Internal Server Error while redirecting to a visualforce page

I am getting the below error while redirecting to VF page while selecting the new record type when i click continue

An internal server error has occurred
An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience.

Thank you again for your patience and assistance. And thanks for using salesforce.com!

Error ID: 608742340-43136 (-1373969722)

apex page and apex class used
<apex:page standardController="Agreement__c" extensions="DispatcherContactNewController"  action="{!pageredir}" showHeader="false" sidebar="false" cache="true" expires="50" >     
This is my new test page
</apex:page>


public with sharing class CustomAgreement {
    public String home {get;set;}
      
    public Pagereference pageredir()
    {
        home= 'CustomAgreement';
        if(home==null)
            return null;          
            Pagereference newpage = new Pagereference ('/apex/'+home);
            return newpage;
            }   
}
Best Answer chosen by Vimal D
James LoghryJames Loghry
I'm still struggling to how this actually compiles.  Your visualforce page shows an extensions attribute with "DispatcherContactNewController" and your Apex class is called "CustomAgreement".  Does DispatcherContactNewController also have a pageredir method?  The mismatch between names could also be the reason you're seeing an error.

All Answers

Deepak RamaDeepak Rama
Vimal
Could you turn on the debug log from Setup -> Monitor -> Logs -> Debug Logs and try to access the page. You would know the exact cause of the error from the log.


James LoghryJames Loghry

Your pageredir method is a little wonky.  Try changing it to the following to see if you still get an error.

public Pagereference pageredir(){
    return Page.CustomAgreement;
}

Vimal DVimal D
Hi,

i tried the above options but still am getting the internal server 


James LoghryJames Loghry
I'm still struggling to how this actually compiles.  Your visualforce page shows an extensions attribute with "DispatcherContactNewController" and your Apex class is called "CustomAgreement".  Does DispatcherContactNewController also have a pageredir method?  The mismatch between names could also be the reason you're seeing an error.
This was selected as the best answer
Vimal DVimal D
Hi James

My mistake, i have changed the class name and it is working fine now. 
Chetna AgrawalChetna Agrawal
I am facing same issue, my code is ok till now.
I want to change 1 inputfield to outputfield, for that i edit the code and didn't change the single line. and getting this error. Need Help..