Need solution for autonumbering in incident records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2024 11:50 PM - edited ‎02-18-2024 11:51 PM
Each time when i open new incident form, a new incident number is generated.
If i don't submit and reopen it, another number will be generated.
If would like to prevent this behavior by implementing a custom business rule. Need sample code for this requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2024 12:31 AM
Hi @keerthika98 ,
Change the system property "glide.itil.assign.number.on.insert" to true.
Reference - https://docs.servicenow.com/bundle/washingtondc-platform-administration/page/administer/field-admini...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2024 12:32 AM
Hi @keerthika98 ,
If you set glide.itil.assign.number.on.insert property to true , it will Assign a task number only upon insert (prevents unused numbers). You will not need a BR,
Warm Regards,
Shivambi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2024 12:38 AM
Hi
- Navigate to All > System Properties > System.
- Set the property Assign a task number only upon insert (prevents unused numbers), glide.itil.assign.number.on.insert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2024 12:55 AM
I believe your ask in only for incident table. If yes , please be thoughtful that if you use Property option as suggested by all other fellows as it will be applied on task level. (task table- which will apply to all inherited tables from task not just incident).
So I would suggest go with Business Rule in this case. For logic, have a look into this thread-https://www.servicenow.com/community/developer-forum/auto-assign-incident-number-onsubmit-instead-of...
Note:- In this thread Client script approach used ,but you can refer the same logic for Business Rule.
Hope it helps. Please mark helpful/accepted if it helps.
Regards,
Priyanka Salunke