Hello,
There has been the need for many customers to add an auto-increment field in different modules within SugarCRM.
I was able to add a custom module that include the Prefix, Serial, Padding (zeros in between).
Each record belongs to a type of record/module.
Hope this helps as an idea.
Regards,
Angel M.