
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2017 03:56 AM
When I choose on an existing custom table, I notice that all existing records have (empty) in their new u_number field. Any new records created, however, will have a number.
Question: How can I safely populate the u_number field on those existing records?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2017 03:59 AM
Hello David,
Refer the below threads may helpful to you.
Auto Numbering for Existing Records
ServiceNow Commnunity MVP -2018 class.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2017 03:59 AM
Hello David,
Refer the below threads may helpful to you.
Auto Numbering for Existing Records
ServiceNow Commnunity MVP -2018 class.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2017 03:59 AM
HI David,
You need to run a background script to update the existing record as already created record wont get updated from auto_number checkbox.
- var gr = new GlideRecord("cmdb_software_product_model");
- gr.orderBy('sys_created_on');
- gr.query();
- while (gr.next()) {
- var nm = new NumberManager('cmdb_software_product_model');
- gr.u_number = nm.getNextObjNumberPadded();
- gr.autoSysFields(false); // Do not update sys_updated_on, sys_updated_by, and sys_mod_count
- gr.setWorkflow(false); // Do not run any other business rules
- gr.update();
- }

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2017 04:05 AM
Thank you both! I wish I could give a *Correct Answer to each!