Get Started with Redwood for Oracle Cloud HCM Begin Now
To ensure that questions get required attention from community members and are NOT left unanswered, it’s important for the author to indicate (by selecting “Yes” or “No” when prompted) whether the question was answered. (newly added) Please note that it is also important to respond to EACH comment your question receives. Your Yes or No response ensures an accurate status for your question.
For more information, please refer to this announcement explaining best practices for getting answers to questions.
For more information, please refer to this announcement explaining best practices for getting answers to questions.
GET_CONTEXT(HR_ASSIGNMENT_ID,0) returns incorrect Assignment ID when employee is on Temp Assignment.
Summary
GET_CONTEXT(HR_ASSIGNMENT_ID,0) returns incorrect Assignment ID when employee is on Temp AssignmentContent
When employee is on a temporary assignment, he has two assignments one in suspended status and one active. Absence Entry Validation Fast Formula is getting incorrect context and hence validations are failing. Can you please help me get correct context ? Formulas work fine for employees on the single assignment.
ln_ASSG_ID = GET_CONTEXT(HR_ASSIGNMENT_ID,0) gives me suspended assignment id even when leave is applied with active assignment. Please find formula below.
Version
20BCode Snippet
DEFAULT FOR IV_START_DATE IS '4712/12/31 00:00:00' (date) DEFAULT FOR IV_END_DATE IS '4712/12/31 00:00:00' (date) DEFAULT_DATA_VALUE for ANC_PER_ABS_ENTRS_ABSENCE_ENTRY_ID_ARR is 0 DEFAULT for PER_ASG_REL_ORIGINAL_DATE_OF_HIRE is '1951/01/01 00:00:00' (date) DEFAULT FOR ANC_ABS_ENTRS_ABSENCE_TYPE_ID is 0 DEFAULT FOR PER_JOB_FAMILY_NAME IS 'A' DEFAULT FOR ANC_ABS_ENTRS_END_DATE IS '4712/12/31 00:00:00' (date) DEFAULT FOR PER_ASG_COL_AGREEMENT_IDENTIFICATION_CODE IS '123' DEFAULT FOR PER_ASG_LOC_REGION2 IS 'X' DEFAULT FOR ANC_ABS_ENTRS_ABSENCE_TYPE_ID is 0 INPUTS ARE IV_END_DATE (date), IV_START_DATE (date),IV_TOTALDURATION, IV_PERSON_ID,IV_TERM_ID ld_effective_date = IV_START_DATE ln_person_id = GET_CONTEXT(PERSON_ID,0) ln_term_id = GET_CONTEXT(HR_TERM_ID,0) ln_ASSG_ID = GET_CONTEXT(HR_ASSIGNMENT_ID,0) ln_pay_assg_ID = GET_CONTEXT(PAYROLL_ASSIGNMENT_ID,0) ln_anl_bal = 0 ln_lsl_bal = 0 ACCRUAL_PLAN_ID = 0 ln_lsl_exec = 0 ln_net_balance = 0 LOS = 0 LOS = MONTHS_BETWEEN(IV_START_DATE, PER_ASG_REL_ORIGINAL_DATE_OF_HIRE) l_vesting_period = 0 VALID = 'N' /* CHANGE_CONTEXTS(HR_ASSIGNMENT_ID=300000009674037) */ ( ln_entry_schedule_duration = GET_PAY_AVAILABILITY ('ASSIGN', IV_START_DATE, IV_END_DATE, 'Y', 'Y', 'Y', 'Y', 'H') ) IF (TO_CHAR(IV_START_DATE,'DD/MM/YYYY') != TO_CHAR(IV_END_DATE,'DD/MM/YYYY')
Tagged:
0