title: How to display a plsql error message with dynamic action
body: <p>I have a plsql that returns a single row and I am executing it by dynamic action, I want to show different error messages by means of <strong>APEX_ERROR.ADD_ERROR</strong> in case there is no value.
  Apparently, all the code is correct, but in case of error, it does not show any message.</p>
  
  <p>note: the dynamic action is by pressing a key Condition on the client side javascript = // Enter key
  this.browserEvent.which === 13
  do not submit page.</p>
  
  <p><em>I do not know if the approach is wrong and you can achieve a better way.</em></p>
  
  <pre><code>        declare
          l_serie number;
          l_codigo number;
          l_product_name varchar2(500);
          l_precio number;
          l_exists number;
  
          begin
  
            select count(*)
            into l_exists
            from (
            select a.ID_INGRESO_SERIE,
                   a.CODIGO_PRODUCTO,
                  (select PRODUCT_NAME 
                   from   TBL_PRD_DET
                   where  PRODUCT_ID =a.CODIGO_PRODUCTO ) PRODUCTO,
                  (select PRICE
                   from   TBL_SALE_PRICE
                   where PRODUCT_ID=a.CODIGO_PRODUCTO
                   and INVETORY_TYPE=1) PRECIO  
            from   TBL_INGRESOS_DET_SERIES a
            where  ID_INGRESO_SERIE =:P58_CODIGO
            and ESTADO_SERIE = 1
            );
  
  
            if l_exists &gt; 0 then
  
              select a.ID_INGRESO_SERIE,
                     a.CODIGO_PRODUCTO,
                     (select PRODUCT_NAME 
                      from   TBL_PRD_DET
                      where  PRODUCT_ID =a.CODIGO_PRODUCTO ) PRODUCTO,
                     (select PRICE
                      from   TBL_SALE_PRICE
                      where PRODUCT_ID=a.CODIGO_PRODUCTO
                      and INVETORY_TYPE=1) PRECIO  
              into   l_serie,l_codigo,l_product_name,l_precio      
              from   TBL_INGRESOS_DET_SERIES a
              where  ID_INGRESO_SERIE =:P58_CODIGO
              and    ESTADO_SERIE = 1;
  
              APEX_COLLECTION.ADD_MEMBER (
              p_collection_name =&gt;'LISTA_VENTA',
              p_n001            =&gt;l_codigo,--CODIGO
              p_n002            =&gt; 1, ---UNIDADES
              p_n003            =&gt;l_precio , ---PRECIO
              p_n004            =&gt;0,   ---DESCUENTO
              p_n005            =&gt;l_serie,---CODIGO SERIE
              p_c001            =&gt;l_product_name,---NOMBRE PRODUCTO
              p_d001            =&gt; SYSDATE
              );
  
            else
              apex_error.add_error (
              p_message =&gt; '¡no exit producto!',
              p_display_location =&gt; apex_error.c_inline_in_notification);
  
            end if;
          end;
  </code></pre>