title: How to create a new record and open a page in APEX 5
body: <p>I'm trying to bind an "Execute PL/SQL Code" to a button using Dynamic Actions then open a page using the new ID (execid) </p>
  
  <pre><code>begin
  insert into SMIG_EXECUTION(EXECNAME, CALL, STEPID, DURATIONMIN)
  values('bla bla',REPLACE(:P31_CALLTEMPLATE,'#STEPID#',to_char(:P31_STEPID)), :P31_STEPID, 0)
  
  returning execid into :P31_NEWEXECID ;
  end;
  </code></pre>
  
  <p>The PL/SQL code is working, but I can't shake the link to opening the new page as a Dynamic Action and passing that new value as P2_EXECID.</p>
  
  <p><a href="https://i.stack.imgur.com/oeKMH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oeKMH.png" alt="enter image description here"></a></p>