getNextObjNumberPadded undefined, maybe missing global qualifier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 02:34 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 02:42 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2024 08:58 AM
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