Sunday, July 26, 2009

Employee ID Series based on Category

Many times there is requirement to have diffenre series of employee ID, instead of having only one Generic series. To elaborate more say different series like RG00001 for Regular series of employee, CW00001 for Contract employee and so on. This article describes how this can be achieved in PeopleSoft HR.
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