Assumed i have a custom entity called Employee. This entity have a field to enter the employee id. The id format is something like this "EMP-0001". For the first time record created, system will automatically add number for the Employee id. And when i created record for the second time, system will increase the number from the last Employee id i have been created. So the second record id will looks like "EMP-0002". In this case i want to create a simple plugin to add autonumber for Employee entity.
So, my questions is how i can get the last Employee id from the Employee Entity. I would be very grateful if you provide me the code :).
Thanks