We wanted to extend the Dutch localization so that the mandatory assignment extra info fields where defaulted automatically when entering a new employee.
First step was to cook up some plsql, based on api's, that creates the assignment extra infos. Easy.
Now we only need to fire that code when they create a new employee.
So a user hook would be nice, but since the assignment screen is still not using an api, that was not an option.
Ok, so let's go dynamic triggers, which in this case corresponds to a real database trigger.
Oops, mutating table errors. Oops, cannot perform rollback/commit in a trigger (hidden in the api calls).
Ok, so let's transform the original piece of plsql into an autonomous transaction.
Oops, no data found. Sure, since it operates as a separate transaction, it does not yet sees the assignment that fired the trigger.
Finally we changed the dynamic trigger into an Update trigger, and pieces felt together.