- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2017 03:15 AM
Hi Team,
we are rebuilding the form on customer page from service portal, could you tell me how to get number field, the getNextObjNumberPadded(); not work
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2017 04:37 AM
Hi Johny,
getNextObjNumberPadded function will not work here because there is no source table for this function. Alternatively, You can Glide on the required table and can use newRecord function to get the number like below.
var inc = new GlideRecord('incident');
inc.newRecord();
data.num=inc.number+'';
(My assumption is you have already created number maintenance for your table).
Hope this helps.
Regards,
Ujjawal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2021 11:01 AM
Just to make sure we have string in data.num. Kind of Similar as toString() function.
Hope it helps.