title: Ajax call returned server error ORA-01403: no data found for APEX Interactive Grid
body: <p>I am trying to save data into my table using an interactive grid with the help of custom plsql. I am running into an "ORA-01403-no data found" error while inserting data and I can't figure out why.</p>
  
  <p>This is my plsql custom process which I run. Appreciate your help.</p>
  
  <pre><code>DECLARE
  
  em_id   NUMBER;
  
  BEGIN
  
     CASE :apex$row_status
  
        WHEN 'C'
        THEN
           SELECT NVL (MAX (emergency_id), 0) + 1
             INTO em_id
             FROM emp_emergency_contact;
  
           INSERT INTO emp_emergency_contact
                       (emergency_id, emp_id, emergency_name, emergency_relation
                       )
                VALUES (em_id, :emp_id, :emergency_name, :emergency_relation
                       );
        WHEN 'U'
        THEN
           UPDATE emp_emergency_contact
              SET emergency_name = :emergency_name,
                  emergency_relation = :emergency_relation
            WHERE emergency_id = :emergency_id;
        WHEN 'D'
        THEN
           DELETE      emp_emergency_contact
                 WHERE emergency_id = :emergency_id;
     END CASE;
  END;
  </code></pre>