groovy fixed
/* * Field-Level Trigger on BBAction_c * Trigger Name: BBAction_AutoSet_Fields * Trigger Type: After Field Changed * * This trigger automatically sets related fields based on BBAction_c selection * and validates business rules for different incentive types and scenarios. */ // ============================================================================ // SECTION 1: Approve Beginning Balance (Pay Full Amount) // Action Code: MAV_DIR_BB_ACTION_1006 // ============================================================================ if (BBAction_c == 'MAV_DIR_BB_ACTION_1006') { println("[BBAction Trigger] Action: Approve Beginning Balance (Pay Full Amount)") println("[BBAction Trigger] IncentiveType: ${IncentiveType_c}") // Verify the Incentive Type condition (COMMISSION or BONUS, not SPIFF) if (IncentiveType_c == 'COMMISSION' || IncentiveType_c == 'BONUS') { println("[BBAction Trigger] Clearing BBReasonCo...