- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2025 10:53 AM
When creating an incident, the number is auto-populating as INC0010001. However, if I create another new incident without saving the first one, it generates the next number as INC0010002. It should retain the same number as the first one if it's not saved. How can this be achieved?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2025 11:04 AM
Hi @Community Alums ,
set the property to true
glide.itil.assign.number.on.insert
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2025 09:11 PM
Hi @Community Alums ,
That property helps to prevent the generation of unused task numbers. by assign the number after the task is inserted into the database
OOB
there is a BR : Get Number
if you enable set the property to true
the 5 line in this BR runs and returns null
else
10th line runs and increases the counter by 1
function getNextObjNumber() {
var assignOnInsert = gs.getProperty("glide.itil.assign.number.on.insert");
if (assignOnInsert == 'true') {
if (current.sys_id.isNil()) {
return null;
}
}
var nm = new NumberManager(current.sys_meta.name);
answer = nm.getNextObjNumber();
if (assignOnInsert == 'true'&& current.sys_meta.name != 'sys_report_summary')
gs.addInfoMessage(gs.getMessage('Number') + ' ' + answer + ' ' + gs.getMessage('was assigned to') + ' ' + current.sys_meta.label);
return answer;
}
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2025 11:04 AM
Hi @Community Alums ,
set the property to true
glide.itil.assign.number.on.insert
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2025 07:02 PM
Hi @Chaitanya ILCR ,
how it is interlinked with that incident number
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2025 09:11 PM
Hi @Community Alums ,
That property helps to prevent the generation of unused task numbers. by assign the number after the task is inserted into the database
OOB
there is a BR : Get Number
if you enable set the property to true
the 5 line in this BR runs and returns null
else
10th line runs and increases the counter by 1
function getNextObjNumber() {
var assignOnInsert = gs.getProperty("glide.itil.assign.number.on.insert");
if (assignOnInsert == 'true') {
if (current.sys_id.isNil()) {
return null;
}
}
var nm = new NumberManager(current.sys_meta.name);
answer = nm.getNextObjNumber();
if (assignOnInsert == 'true'&& current.sys_meta.name != 'sys_report_summary')
gs.addInfoMessage(gs.getMessage('Number') + ' ' + answer + ' ' + gs.getMessage('was assigned to') + ' ' + current.sys_meta.label);
return answer;
}
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya