Last Employee ID generated is stored in PS_INSTALLATION Table. TO achieve this
1. First step is to create a custom place holder to store LAST Id for different category. The structure of table can be something like
CATEGORY PREFIX LAST ID
Regular RG 10001
CWR CW 10001
2. Next, we need to customiz the function where delivered code to generate ID is written.
3. Open FUNCLIB_HR.EMPLID.FieldFormula and modify the function to get the last number.
Function AssignNextId(&Recname As string, &Fieldname As string,
....
If &Fieldname = "EMPLID_LAST_EMPL" Then
&NextId = GetNextAutoNumber(recordname, LastID);
4. Save and Test
Thank you Ajay for the handy information. Your article/information saves so much time and avoids re-inventing the wheel. Just a suggestion - Can you put such handy information in Mirta tool? It would benefit many others. Keep posting such useful stuff..
ReplyDelete