Apex version 24.2.5
Database: 23ai
Hello,
I have been working with Apex for about a year and a half now and currently I'm working with an Interactive Grid that uses a REST Data Source and Automatic Row Processing to save the grid data. One challenge i'm facing is error handling when saving multiple rows at once.
I'm able to use the response body to display error information from the endpoint, but I can't determine which row the error occurred on. Getting this information would be easier, I assume, by using PLSQL code and the package "APEX_EXEC" in the target type of the Automatic Row Process instead of Region Source, but I would like to see if there is a low-code approach to this.
I have considered using the Apex views "APEX_WEBSERVICE_LOG" and APEX_WORKSPACE_ACTIVITY_LOG to pull the last failed request URL as it contains the id (e.g., <Base URL>/emp/hol/7499).
The query would be something like this:
select serv_log.url
from apex_webservice_log serv_log
left join apex_workspace_activity_log act_log
on serv_log.activity_log_id = act_log.id
where act_log.apex_session_id = :app_session
and act_log.apex_user = :app_user
and act_log.application_id = :app_id
and act_log.page_id = :app_page_id
and status_code not like '2%'
order by serv_log.request_date desc
fetch first 1 row only
Does anyone know of a better way to find which row in the Interactive Grid the error occurred on?
Best Regards,
M. Hansen