I have an APEX page with a button that opens a modal dialog page for creating new record. When a link clicked on an interactive report, the record clicked is loaded on the modal dialog page. On that page I can either edit existing record or create a new one. When editing current record, a primary key is passed in and when creating a new records, it is not.
On the modal dialog page I have an automatic row fetch. I started getting ORA-01403: no data found
error because the row fetch does not return any records (obviously, because no record exists when the "create new" button is clicked). My question is how can I avoid getting the error in the fetch when primary key is null.