Skip to content

PL/SQL code inside a Custom Event that queries a view built on VOUCHER (like voucher_row) to check related records before allowing an approval works fine in an older release but throws a mutating-table error against VOUCHER_TAB on a newer one.

Answer

Query the underlying table directly (voucher_row_tab) instead of the view (voucher_row) — since this code is running inside an event/trigger context, tables can be queried directly there, and doing so avoids the mutating-table restriction that querying the view (which itself selects from the table currently being modified) can trigger.

← Browse Developer Studio, deployment, and upgrades questions