You need to sign in to do that
Don't have an account?
uma52551.3972270309784705E12
How to set redirect in the controller class
Hi,
Please help me to correct my code below:
if(AssumptionList.size() > 0){
String strAssumptionFloodOnlyUrl = objArkCampaign.Domain_Name__c + '/Assumption?AssumptionId=' + AssumptionList[0].Assumption_ID__c;
PageReference newFloodOnlyUrl = new PageReference(strAssumptionFloodOnlyUrl);
newFloodOnlyUrl.setRedirect(true);
return;
}
According to the above code it has to redirect to another page(objArkCampaign.Domain_Name__c + '/Assumption?AssumptionId=' + AssumptionList[0].Assumption_ID__c) and display the content of this but it is not doing so. It is printing this page content in the old page itself( The Url in the address bar is also not changing)
Thanks in advance
Please help me to correct my code below:
if(AssumptionList.size() > 0){
String strAssumptionFloodOnlyUrl = objArkCampaign.Domain_Name__c + '/Assumption?AssumptionId=' + AssumptionList[0].Assumption_ID__c;
PageReference newFloodOnlyUrl = new PageReference(strAssumptionFloodOnlyUrl);
newFloodOnlyUrl.setRedirect(true);
return;
}
According to the above code it has to redirect to another page(objArkCampaign.Domain_Name__c + '/Assumption?AssumptionId=' + AssumptionList[0].Assumption_ID__c) and display the content of this but it is not doing so. It is printing this page content in the old page itself( The Url in the address bar is also not changing)
Thanks in advance
return the newFloodOnlyUrl;
or else check the value of strAssumptionFloodOnlyUrl by using system.debug.