
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2019 06:02 AM
Hi All,
I am creating records dynamically in alm_asset table via run script activity in workflow. Whenever a record is created i need to set unique value to both "Asset Tag" field and "Serial Number" field. Can anyone help how can we achieve this without number maintenance?
Regards,
Sirraj
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2019 10:58 PM
Hi Abhishek,
Thank you for the reply and sorry for the late response.
I have achieved this without number maintenance. I have stored a counter value in property and whenever i am inserting a record i have called that property to set numbering for the asset field.
-Sirraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2019 06:08 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2019 06:22 AM
Hi Sanjeev,
Thank you for taking time and replying to my post. This is not am looking for, i need to create records with auto numbering the asset tag field.
Regards,
Sirraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2019 06:28 AM
Hello Siraj,
Administrators can manage record numbering by navigating to System Definition > Number Maintenance. The current number format for a table, including the prefix (such as INC for incidents or CHG for changes), is stored in a record on the Number [sys_number] table.
Reference : https://docs.servicenow.com/bundle/newyork-platform-administration/page/administer/field-administrat...
There is entry available for asset table in number maintance table, if not create for it.
Please mark as Correct Answer and Helpful, if applicable.
Thanks!
Abhishek Gardade
Hexaware Technologies
Abhishek Gardade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2019 06:39 AM
You need to create entry for Asset table :
And in script you need to add below line for auto numbering:
var gr = new GlideRecord('alm_asset');
gr.initialize();
gr.asset_tag = new NumberManager(gr.sys_meta.name).getNextObjNumberPadded();
gr.insert();
OR Option 2:
Please mark as Correct Answer and Helpful, if applicable.
Thanks!
Abhishek Gardade
Hexaware Technologies
Abhishek Gardade