getNextObjNumberPadded(); was not working

cloudminus89
Mega Contributor

getNextObjNumberPadded(); was not working

we had a history of duplicate numbers in a table, and implemented the recommended solution documented here:

https://docs.servicenow.com/bundle/london-platform-administration/page/administer/field-administration/concept/c_EnforcingUniqueNumbering.html

and yet...the next number padded function instead of returning last number + 1 was returning an already existing number and creating further duplicates

 

I managed to solve it by going to :

sys_number_counter.list > locating the table in question, 

and incrementing the number 

1 REPLY 1

Andrew Barnes -
ServiceNow Employee
ServiceNow Employee

Greetings cloudminus89,

 This doesn't appear to be a question. If you want to report a bug, submit it to HI. I have used getNextObjNumberPadded routinely and it has worked. It is likely there is another rule or process jumping the line. 

-Andrew Barnes
Join me at Developer Blog