title: commandbutton action
body: <p>I have a commandbutton, When click I want it to save a phonecall record and redirect to the record page, after that open a new page in a new window which shows the editing page of a new case related to the call. </p>
  
  <p>I am doing it like this:</p>
  
  <pre><code>//Pseudocode
  public PageReference saverecord(){
     create a new phone call record;
     insert record;
     if(createnewcase)
        create case;
        insert case;
        create editcaseURL;
     return phonerecord page;
  }
  </code></pre>
  
  <p>on the client side, In the commandbutton, I use <code>&lt;apex:param name="newcase" value="true" assignTo="{!createNewCase}"/&gt;</code> to set the createnewcase to true. and oncomplete javascript to open the popup window. I have test the phonerecord and caserecord seperately and succeeded. but when I put them in one class, the case was never created. and in the visualforce view state window. I can't even find the boolean createnewcase.</p>
  
  <p>please help.</p>
  
  <p>Thanks</p>