I have several cases where there are standard master-detail compositions and we need the detail records to get the next number in sequence when a new record is added. DB-level sequences are system-wide so we can’t use that. This needs to be per-master, if that makes sense.
Is there a built-in facility to handle this, or barring that, is there an accepted “best practice” way to do it?