employeeconsent

// 1. Identify the specific business scenarios def is1011 = (BBActionManual_c == 'MAV_DIR_BB_ACTION_1011' && HRStatus_c == 'A' && EmploymentCountry_c != 'RO' && SalesRP_c == 'N' && CED_c <= 0 && (IncentiveType_c == 'COMMISSION' || IncentiveType_c == 'BONUS')) def is1012 = (BBActionManual_c == 'MAV_DIR_BB_ACTION_1012' && IncentiveType_c == 'BONUS' && HRStatus_c == 'A' && SalesRP_c == 'A' && CED_c <= 0) // 2. Case: Mandatory Check Required // If conditions are met, the box MUST be 'Y' if (is1011 && EmployeeConsent_c != 'Y') { throw new oracle.jbo.ValidationException("MPA to Payroll Collections requires manual acknowledgement. Please check Employee Consent.") } if (is1012 && EmployeeConsent_c != 'Y') { throw new oracle.jbo.ValidationException("SPIF vs Comm deduction requires manual acknowledgement. Please check Employee Consent.") } // 3. Case: Restricted // If conditions are NOT met, the box MUST NOT be 'Y' if (!is1011 && !is1012 && EmployeeConsent_c == 'Y') { throw new oracle.jbo.ValidationException("Employee Consent is not applicable for this record configuration. Please uncheck the box to save.") } return true

Comments

Popular posts from this blog

dev7 from eror

EPA

Unified Currency Report- Krithika