function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ravi_SFDCRavi_SFDC 

Auto Number for Contact Object

I want to generate an auto number for the existing contacts. Example as below

1. I do have 5 contacts (A, B, C, D and E) in prod, I want to have an auto number (generate the auto number). I have my format as R001. I want the auto number for A as R001, B as R003, C as 002, D as R005 and E as R004. How can I achieve this?

2. I want to have a record type AUTO NUMBER, once I complete the above scenario if I want to create a new contact (where I have a record type) based on the record type my new contact should have the auto number as R006 (as 5 has been completed for the existing contacts).

Your help would be really appreciated.

Thanks & Regards
Ravi

 

 

Arun Kumar 1141Arun Kumar 1141
Hi @Ravi_SFDC,

In order to achieve the above functionality, you can make a custom field in which :

Data Type : Auto Number
Display Format : R{000}
Starting Number : 1

By following the above, for every contact you would get an auto generated format as R{001}.

Hope this helps.

Thank you.
 
Ravi_SFDCRavi_SFDC

Hi Arun, 

Thanks for the quick response. I have implemented that and that is workign fine. My concern is for the existing 5 contact records in production i want the auto number to be completed. As said above

I do have 5 contacts (A, B, C, D and E) in prod, I want to have an auto number (generate the auto number). I have my format as R001. I want the auto number for A as R001, B as R003, C as 002, D as R005 and E as R004. How can I achieve this?

Thanks

Arun Kumar 1141Arun Kumar 1141
Hi @Ravi_SFDC,

In order to generate auto number for existing records, you just need to check the field :
Generate Auto Number for existing records.

User-added image

Hope this helps.

Thank you.
Ravi_SFDCRavi_SFDC

Hi Arun,

Thank you. This option would generate accordingly, but I need it according to my requirement. 

Requirement: I want the auto number for A as R001, B as R003, C as 002, D as R005 and E as R004.

The Generate Auto Number for existing records would generate as A (R001), B (R002), C(003), D (R004) and E (R005), which I don't want.

Thank you.