Auto-number Functional Changes

Here's a description of the functional changes applied to the Auto-number field behavior.

FunctionalityPrior to Version 5.0Behavior from 5.0 onward
Starting number
  • In the Field XML Definition, the field property was - autoNumstart
  • When installing a new application or cloning an object definition, the auto-number sequence always starts from 1.
  • The Starting number is used to initialize the auto-number sequence. Once initiated, the auto-number sequence is known as the Current Number.
  • In the Field XML Definition, the field property “autoNumStart” is replaced with “startingAutoNumber”.
  • When installing a new application or cloning an object definition the auto-number sequence starts with the Starting number.
Current NumberThis property did not exist. Instead, the starting number displayed the current running sequence of the auto-number field.
  • The current number can be set to any value greater than the current value.
  • If you choose to specify a lower current number value, check for any existing records for the selected object. If records are available, delete all those records from the object and the Recycle Bin.
  • This property is displayed only when you are editing the auto-number field.
  • Editing a current number is a separate action performed in the Edit Current Number dialog which updates the current number when you save it.
Note: The value of a current number cannot be edited or retrieved through APIs .
  • Field Definition Level Validations
  • Triggers (before create action)
  • Field level validations are executed for records.
  • All triggers used to consume the auto-number field value.
When a record is being created from the user interface, there is no validation involved as the auto-number field is empty until the record is created.
Note: When creating a record from the user interface, if there are null or blank check applied on the auto-number field, the validation triggers might fail due to which the script might need modification. Other triggers consume the auto-number field value.
Create recordsThe auto-number field behavior for creating records from the user interface and the APIs were different. The auto-number behavior is similar whether you are creating records from the user interface or the APIs.
  • Displays the text, " Auto-generated" in the user interface. Platform generates a value for the auto-number field when the record is saved.
  • Platform generates a value for the auto-number field, if the value is not specified in the API.
Edit recordsThe auto-number field behavior for editing records from the user interface and the APIs were different.The auto-number field behavior is similar when editing records from the user interface and APIs. In both the cases, the current number is updated only if the auto-number field value is set in a valid format.
Cloning records Platform always generates a new value for the auto-number fields when cloning a record through the user interface or an API.
Note: The current number is updated only if the auto-number field value is set in a valid format.