Twenty years of custom code, read and rewritten.
Dexterity in GP. C/AL in NAV. Written for a business problem, by someone who left before the current controller was hired, and documented nowhere.
Behaviour preserved
Replayed against real payloads. If the new code does not behave the way the old code did, it does not ship.
Unsafe paths found
The retry that would have double-posted a payment is found and guarded before the first write, not after the first close.
Direct writes removed
Anything writing straight into the database gets an API path and loses the back door.
Most of it does not need to move.
Every customization is catalogued and classified: carried forward, rewritten as an extension, or retired because the target does it natively or the problem no longer exists.
On a typical GP estate, nearly half is retired.