Skip to content

How do you populate a persistent custom field on a new Customer Order header with the value of a related custom field held on the Customer record, so the value carries over automatically at order-creation time (while still letting users override it on the order afterward)?

Answer

Create a Custom Event on the relevant order-header logical unit that fires on insert (and optionally on update, if the source value can change), and have its action read the value from the related Customer record's custom field and write it into the new order's own custom field. Because this kind of cross-record read-and-write inside an insert trigger context can hit Oracle's mutating-table restriction, route the actual update through a deferred background call (Transaction_SYS.Deferred_Call) rather than performing it inline in the trigger — this lets the order's custom field still populate automatically from the customer's value, without the operation running into ORA-04091.

← Browse Developer Studio, deployment, and upgrades questions