Auto Numbering

Kumar38
Kilo Sage

I need to Populate Correlation ID on a Custom Table with numbers starting from 400000 and Incremented by 1 and If Possible need to Validate If number already exists.

Tried : javascript: global.getNextObjNumberPadded();

How Do I do this?

8 REPLIES 8

Bhawana Upreti
Tera Guru

Hi,

Go to sys_number table and create a record with the given info:

Table: Enter your table name in which Correlation Id exist

Prefix: What you want see see at the starting of number like we have INC at the starting of incident number.

Number:400000

Number of digits: How many digit you want in your number.

Default value of fieldjavascript:getNextObjNumberPadded();

Note: This script renumbers records when the Number of digits is updated. To use a script that does not renumber records when the Number of digits is updated, open the dictionary entry for the Number field and enter the following script in the Default value field.  javascript:getNextObjNumber();

 

Thanks.

Also, Please see the given link to enforce unique numbering.

Thanks.

I tried "javascript:getNextObjNumber();" . But I can see numbers are getting Incremented even If I don't save the record

You can find this helpful: Prevent numbering gaps