How do you generate a new ticket number only on save?? Basically prevent unused numbers...

joed_souza
Kilo Explorer

It appears like by default, if you click on New Incident or New Problem or New Change, a number (SYS_ID) is automatically generated even before you save the ticket so in case you do not need to save it, that number is gone forever.

How would you prevent that from happening - meaning assign a new number (SYS_ID) for a ticket only if you save or submit it?

Joe

11 REPLIES 11

Thanks everyone for their comments, includingctomasi


Hi Joseph,



You can do this on your own by replicating the business rule that generates numbers (getNextObjNumberPadded) and make it behave the way you want on which tables. I've done this in the past. It's not a big deal, but it requires that you remember which tables are using which numbering methods. For example, copy it and call one



getNextObjNumberPadded_Incident



then create a dictionary override for the number field on that table only to be javascript:getNextObjNumberPadded_Incident



As for reclaiming, I agree with the others, it is probably not worth the effort and could cause some confusion.