Skip to content

A Custom Event meant to restrict which Sales Contract categories a specific permission set can Award hits a mutating-table error, because the PL/SQL block queries the Sales Contract's own category value with a SELECT inside the event triggered on that same table.

Answer

Rather than querying the category value with your own SELECT inside the event's PL/SQL (which is what's actually causing the mutating-table error, since it re-queries the same table the event fired on), check whether the value is already available as a bind variable exposed directly by the triggering window/screen context — many standard fields are already accessible this way without needing a separate query. Referencing that existing bind variable directly in your condition/action, instead of re-querying the table for a value the event context may already expose, avoids the mutating-table problem entirely rather than needing a deferred-call or autonomous-transaction workaround for this specific case.

← Browse Developer Studio, deployment, and upgrades questions