+ 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

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.

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?