How can I create the following formula field (with API name Username) on Contact?
First letter of FirstName + LastName + Number, such that if the combination is not unique, the number would make it unique.
For example, if I have a contact with FirstName being equal John
and LastName being equal Parker
the Username would be equal JParker
then.
And if I will add a contact James
Parker
later on its Username would be JParker1
(given that there were no Contact with the FirstName starting with the letter J
and LastName Parker
added between).
Is it a good idea to use a formula field for Username at all? If so, how could I create such a field?
Thank you.
And I would like to preserve the number at the end of Username (e.g. if I delete JParker
, the JParker1
should not change to JParker
).