function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Page re-direct

Does anyone know why this line works in development mode only? 
After the user clicks save:
In development mode, the next page is lmi2.  Which is what I want.
In non-development mode, the it returns to standard edit page for the custom object. 
<apex:commandButton action="{!save}" value="Save" onclick="window.parent.location.href='/apex/lmi2'"/>


Your javascript isn't working because when you're in development mode the page is loaded in an iframe.

However I think you should go back and review the doc for action methods and commandButton.  You return the next page you want to go to from your save method.

If you're using a standard controller, look at the section on extensions.  You can override the save method, delegate the save call to the standard controller, and then return Page.lmi2.