Loading

Auto-Number Count Resets After Deployment via Change Sets

Дата публикации: Jan 26, 2026
Описание

This article explains the issue where the Auto-Number count resets when deployed using Change Sets. This is expected behavior because the Starting Number is not included in the metadata.

Решение

When an Auto-Number field is migrated to another environment using Change Sets, the Starting Number is not retained and starts from 0. This is because the Starting Number value is not included in the metadata. Therefore, you must manually reset the Starting Number after migration using the following steps in the target organization.


Resolution
1. Manually Set the Starting Number
Perform the following steps in the target organization:

  1. From Setup, select Object Manager, then select the target object.
  2. Click Fields & Relationships, then click Edit next to the target Auto-Number field.
  3. Enter the appropriate value in the Starting Number field.
  4. Click Save.


2. Retaining Existing Values
If you want to carry over the count from the source organization, you can temporarily change the data type to Text and use Data Loader to update the field.

For details, please refer to the Salesforce Help article "Change the format of an auto number field on existing records".

Дополнительные ресурсы

There is a request on the IdeaExchange for the ability to migrate Auto-Number field counts to another organization.

Ability to migrate auto number fields from one org to another

Номер статьи базы знаний

005299386

 
Загрузка
Salesforce Help | Article