title: apex_application.g_print_success_message variable does not get set
body: <p>On my DML form I have a delete process that calls a PL/SQL function:</p>
  
  <pre><code>DECLARE
   err_code NUMBER;
  
  BEGIN
  my_package.delete_record(id =&gt; :P2_ID,error_code =&gt; err_code);
  
  IF NVL(TO_NUMBER(err_code),0) = 0 THEN  
          apex_debug.message('Record deleted');
          apex_application.g_print_success_message := 'Record deleted';
  END IF;
  
  END; 
  </code></pre>
  
  <p>Somehow apex_application.g_print_success_message does not get set and displayed even though everything else works as I see a debug message being written. Can anyone help my figure this one out? Could it be because I have multiple processes on the page?</p>