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
David OvellaDavid Ovella 

​How to create a field auto number with letter in it?

Hello, I want to know if it is posible to create an autonumber field the looks like this

A-01 to A-99
and then changes the letter B-01 to B-99, C-01
Jai ChaturvediJai Chaturvedi
Hi,

This can be done using apex code. 

Create a text field.
In trigger check if for any specific alphabet 99 is reached and then start next letter in teh series.


Thanks
Jai
Jai ChaturvediJai Chaturvedi
If we are creating autonumber then it will not stop at 99. it will create A-100. I think this needs to be done via code.
Rahul GoyalRahul Goyal
Use two for loops, outer loop will change your alphabet and inner loop will change the number..  
David OvellaDavid Ovella
thanks for replying, but I'm new in this. By any chance do you have an examples where I can see how to do it?