You need to sign in to do that
Don't have an account?

Page ..... does not exist
I am getting this error on a VF page :
This page is redirected from another controller class : The details are coming on the URL but on the page it is displaying error as :Page DetailController does not exist
External Controller Class : Method :
public PageReference SaveChanges()
{
String OppId = ApexPages.currentPage().getParameters().get('Id');
Splits__c LitOrd = new Splits__c();
DSObj = new List<Splits__c>();
LitOrd.Opportunity__c= Opp.id ;
DSObj.add(LitOrd);
insert DSObj;
insert OppTeam;
PageReference pageRef = new PageReference('/apex/DetailController?Id='+opp.Id);
return pageRef;
}
--------------------------------------
VF page :
<apex:page controller="DetailController" tabstyle="Opportunity">
<apex:form >
<apex:pageBlock title="Region Details">
<apex:pageBlockTable value="{!wrappers}" var="wrapper" id="wtable">
<apex:column headerValue="Ident">
<apex:outputText value="{!wrapper.ident}"/>
</apex:column>
<apex:column headerValue="Region">
<apex:inputField value="{!wrapper.MSalesO.Region__c}"/>
</apex:column>
</apex:pageBlockTable>
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlock>
</apex:form>
</apex:page>
--------------------------------------
Controller Class :
public class DetailController
{
public List<SOWrapper> wrappers {get; set;}
public static Integer addCount {get; set;}
private Integer nextIdent=0;
public DetailController()
{
wrappers=new List<SOWrapper>();
for (Integer idx=0; idx<5; idx++)
{
wrappers.add(new SOWrapper(nextIdent++));
}
}
public void addRows()
{
for (Integer idx=0; idx<addCount; idx++)
{
wrappers.add(new SOWrapper(nextIdent++));
}
}
public PageReference save()
{
List<Order__c> MSO=new List<Order__c>();
for (SOWrapper wrap : wrappers)
{
MSO.add(wrap.MSalesO);
}
insert MSO;
return new PageReference('/' + Schema.getGlobalDescribe().get('Order__c').getDescribe().getKeyPrefix() + '/o');
}
public PageReference SaveDS()
{
return null;
}
public class SOWrapper
{
public Order__c MSalesO {get; private set;}
public Integer ident {get; private set;}
public SOWrapper(Integer inIdent)
{
ident=inIdent;
MSalesO=new Order__c(Opportunity__c='006f0000003afa5' + ident);
}
}
}
Hi,
Is your page name :'DetailController'??
The page name is Detail, I updated the external class details to
PageReference pageRef = new PageReference('/apex/Detail?Id='+opp.Id)
but it is still giving the same error .
My profile has access to this page.
To make sure that the page exists and prevent some errors, I'll suggest to use something like this
Regards
URL : https://cs15.salesforce.com/apex/details?Id=006f0000003anOmAAI
This is giving the error ..
Invalid id: 006f0000003afa50 : This is the opportuinity id
An unexpected error has occurred. Your development organization has been notified.
Its me or does that ID have 16 characters?. (the one in the error message)
Keep in mind that Salesforce IDs have either 15 or 18 characters.
How are you getting your ID?
This is the method , passing Id in url
public PageReference SaveChanges()
{
String OppId = ApexPages.currentPage().getParameters().get('Id');
Splits__c LitOrd = new Splits__c();
DSObj = new List<Splits__c>();
LitOrd.Opportunity__c= Opp.id ;
DSObj.add(LitOrd);
insert DSObj;
insert OppTeam;
PageReference pageRef = Page.DealSplitsAddDetails;
pageRef.getParameters().put('Id',opp.id);
return pageref;
}