Customer requirement is to generate vacation leave entitlement once the employee status becomes REGULAR.
Example: Employee is Probationary from 1st January to 30th June. On July 1, the employee becomes REGULAR. That's the only time the leave should be accrued.
It's a very common practice in many countries to hire employees as probationary. This is reflected in the employment status field under Job Information. After few months, the employee will either be terminated if he didn't meet the job expectations or will get regularized. As a regular employee, he /she is now eligible to company benefits which include but not limited to XX days of vacation leaves, XX days of sick leave, etc. Querying employee Job Information to grant certain leave entitlements are very common.
Succesfactors - Employee Central - Time Off
If we use Job Information fields in IF condition of the hire/accrual rule to compare the field values, the rule will always take the field value from the hire record (in case of hire rule scenario) or valid as of the Accruable start date for exisitng users and not from the latest Job Information record.
This resolution is as per the requirement from this particular customer.
- Create a custom date field in Job Information
- Create an onSave rule with base object as Job Information to set the effective date of the Job Information record into this custom field only if both the fields ‘Employment Status’ and 'Employment Type’ have value as ‘Regular’ else the field will be empty.
Rule Logic is:
IF ‘Employment Status’ and Employment ‘Type’ are ‘Regular’
Set ‘Custom-date’ equal to Job Information.effective date.
i.e in the Job Information of the employee, for the first record dated 1st Jan 2017 , this custom date field will be empty but for the second record dated 1st july 2017, the custom date field will have value 1st July 2017.
- Create a lookup with 2 new custom field (cust_LeaveEntitlement and cust_MonthoftheYearNumber) with data type as decimal.
- In Manage Data -> LookupPharex -> Set the month number in the new custom field 'cust_MonthoftheYearNumber' and the leave entitlement in 'cust_LeaveEntitlement'. For example: If it is January, set ‘cust_MonthoftheYearNumber’ as 1, if April set it as ‘4’ etc.
- Set the hire rule as below(Here the Time account is annualy and accrual is monthly).
Because in case of hire record it would be null and in that case we are not interested in posting the accrual.
Time off Leave entitlement Job Information field , KBA , LOD-SF-EC-TIM , Time-Off , How To