Converting text field to Auto number - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Deep MRVDeep MRV 

Converting text field to Auto number

Hello Experts,

I have account ID which is text field (length 40) now but will be an auto number once data importing is done. My concern is will there be any data loss if I change it to auto number after data import?

Or else, instead of having Acc ID as text if I make it as auto number then while importing data will it cause any consequences?

Please suggest me a better approach, TIA.
Sunil SarillaSunil Sarilla
Hi Varsha,
If you change the data type of the existing Text field to Auto Number, the Auto number will only be applicable to New records and existing records will remain unchanged.
why do you want to change the text field to Auto Number after the import, dont you want the Auto Number applicable for the existing records and any records that you are importing now.
Sunil SarillaSunil Sarilla
Hi Varsha,
You can do that way.
But is there a specific reason why you want to import the Accounts with the text field, is it because a specific Account should have a specific Number and if thats not the case I will make the field to be a Auto Number field.
As i said earlier any existing records in salesforce will not get affected but if you want the Auto Number to be applicable to all the existing records you will either have to update the existing Accounts with an Number, then change the data type of the field to auto number and the starting number should be the next number from your last Number or alternatively create a brand new auto number field and have the auto number format applicable for all existing records and delete the existing field.
Sonika TomarSonika Tomar