Incident and change OOB servicenow allows for duplicate numbers. I need that stopped as it is impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2024 11:09 AM
Incident and change OOB servicenow allows for duplicate numbers. I need that stopped as it is impacting reporting. There are articles online how to fix/stop this from occurring
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2024 11:21 AM
HI @R1R3
Could you please tell us, where you finding these duplicates? In related list or form or where. A screesnshot will be helpful.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2024 11:21 AM
Hi @R1R3 ,
You can refer below articles for getting duplicate value,
Also you can create a business rule as mentioned in the servicenow doc ,
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2024 11:40 AM
Hi @R1R3 ,
solution1 :
go to the dictionary of number field, you can set the default value of the number field as
solution2 :
go to the system properties list and search for "glide.itil.assign.number.on.insert", and set the value as 'true'.
Solution 3:
create before business rule on table with below code:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var gr = new GlideRecord('incident');
gr.addQuery('number', current.number);
gr.query();
if(gr.next()) {
gs.addErrorMessage("An incident is already present with the same number " + current.number);
current.setAbortAction(true);
}
})(current, previous);
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda