How do you generate a new ticket number only on save?? Basically prevent unused numbers...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2016 09:19 PM
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
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2016 09:07 PM
So it is not possible to control that at a form (Incident, Problem) level?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2016 07:56 AM
There is a Global Business Rule named getNextObjNumberPadded. This is the code that gets called when you first open a form and it populates the number.
You can go to the dictionary entry for the number column on the task table, and see the default value is calling this script.
This is also where it references that property. You could customize this Business Rule to look at the table and make that call.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2016 10:33 AM
Is there any way to reclaim unused records? I only just recently enabled "Assign a task number only upon insert (prevents unused numbers).", and would like to do some sort of reclaim of these "blank" records.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2016 10:54 AM
You would need to create your own custom function that would be a wrapper around the getNextObjNumberPadded. You would also need a way to get a list of all of the missed numbers, and make sure that as you handed them out, two requests coming in at the same time did not get the same number. It would be a complex undertaking just to have every possible number used.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2016 01:28 PM
Not to mention, you'd have new tasks with numbers out of sequence based on creation date.
I don't know that the inconsistency would be worth it... Another option would be to change the table's numbering prefix being used and restart the numbering now that you have your setting in place. But again, you're talking about a change that some people might not be thrilled about... however, at least the numbers would be ordered consistently when compared to creation date.
-Brian