Setup:
I have a VF page embedded in standard page layout, "source." when the user clicks a button that is in the VF Page, he should get sent to a new page "destination".
Problem: the destination page is opening within the VF section of the page layout- "source" This only occus when the user is not in development mode.
VF
<apex:pageBlock rendered="{!IF(ISNULL(record) , true , false)}">
<apex:pageBlockSection columns="1" title="Analysis"/>
<center>
<apex:commandButton value="Create Strategies" action="{!createNewRecord}"/>
</center>
</apex:pageBlock>
Controller:
public pageReference createNewRecord(){
PageReference p;
String s = '/a0K/e?CF00Ne0000000fqjP=' + this.record.name + '&retURL=' + this.record.id;
p = new PageReference(s);
p = p.setredirect(true);
return p;
}