The CreatorCon Call for Content is officially open! Get started here.

getNextObjNumberPadded undefined, maybe missing global qualifier

NikhilSt
Tera Contributor

In social media application, Monitor section when i see records I found number filed as blank. When i create any new record also in Monitor table, it gives mentioned exception - getNextObjNumberPadded undefined, maybe missing global qualifier. I am unable to understand where is the issue ? Thanks in advance if any clues.

2 REPLIES 2

Gopal Allu
Tera Expert

Hi @NikhilSt ,

 

Can you check this article once. https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0779911

 

You can simply try to change the default value from:

javascript:getNextObjNumberPadded();

to:

javascript:global.getNextObjNumberPadded();

 

Thanks and Regards,

Allu Gopal.

Subhashis Ratna
Tera Guru

Hi @NikhilSt ,

Despite implementing the recommended solution documented in ServiceNow documentation, we still encountered duplicate numbers in our table. Instead of returning the expected next number, the "getNextNumberPadded" function generated existing numbers, resulting in further duplicates.

Here for better reference kindly do check these links:

Link 1 : https://www.servicenow.com/community/developer-forum/getnextobjnumberpadded-was-not-working/m-p/2224...

Link 2 : https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0779911

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Subhashis