You need to sign in to do that
Don't have an account?
![whatAmIdoing whatAmIdoing](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Redirect prevents system.debug messages from appearing
If I comment out "return casePage;" then my debugging messages appear in my System Log, but if uncommented the page redirects and no messages appear. Why would this be?
Thanks.
if(myModelID != NULL && parentcase != NULL) {
System.debug('if all is well');
for (String i : myModelID) {
System.debug(i);
System.debug(parentcase);
}
PageReference casePage = new PageReference('/' + parentcase);
casePage.setRedirect(true);
return casePage;
}
Hello whatAreYoudoing;
Since you use the "setRedirect(true);" method you gets two debug logs at once. For the page where you invoke the action and for the page you are redirected to(In your case this is the page "casePage").
Sometimes you may be looking at the wrong log line. As I think in your case the relevant log line should be the line before the last line.
Please look at the "Operation" column in the debug log and find the relevant line.