Number Duplicate Issue

Ben42
Tera Contributor

Hi Experts,

I am having issues with duplicate numbers. When a new defect record is created the number is being duplicated. HI Portal proposed us a solution to create before insert business rule (below link). 

https://docs.servicenow.com/bundle/orlando-platform-administration/page/administer/field-administrat...

After creating that link, I get like this but the highlighted defect number also already exists in our system.

find_real_file.png

 

How can I solve this?

 

Thanks,

Ben.

5 REPLIES 5

xiaix
Tera Guru

The default value for the 'number' field (which is from the task table) on the 'rm_defect' table should have this:

find_real_file.png

If so, how are you creating the new Defect record?  If you are doing it through code, is that code trying to manually assign a "Number" ?

Ben42
Tera Contributor

Yes, Number field has that default value. And I am creating defect from "New" button.

find_real_file.png

 

Thanks,

Ben.

Ok, your situation is indeed odd then.

Here's what happens in my instance:

 

find_real_file.png

find_real_file.png

find_real_file.png

 

The only reason I'm missing some numbers in between 70 and 74 is because I deleted records 71, 72, and 73.

mr18
Tera Guru
Tera Guru

I have a workaround.

Click New but do not save the record, so this will bypass the number and next time you will click on New it will take the number as +1 than the previous one.

Suppose you have clicked on New button and Number shows is DFCT001. Dont save this record and again click on New button. This time number will be DFCT002. Keep doing the same till it passes on the last defect number.

Lets say last record is having number DFCT008 so keep doing the step unless it crosses DFCT008