Announcement

Collapse
No announcement yet.

Automated customer number

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Automated customer number

    Hello,
    I would like to add a new field for customers: the customer number.
    It should look like this KD2020-00001

    and I would like it to automatically take 2020 as the current year and always increment 00001 automatically.

    how do I do this?

    Kind regards
    Simon

  • #2
    Hi,
    You can add to your entity a new field of the 'Number (auto-increment)' type via Administration -> Entity Manager. You can define the 'KD2020' part in the prefix parameter https://docs.espocrm.com/administration/fields/#number.
    In case you need only predefined '2020' instead of 'KD2020', you can try to utilize a concatenate formula in order to create a dynamic builder of the prefix you need https://docs.espocrm.com/administrat...ingconcatenate. For example:
    Code:
    numberAutoincrement = string\concatenate('KD','2020-', numberAutoincrement);

    Comment

    Working...
    X