Skip to main content
Dave Smith a posé une question dans #Data Management
I am new to Apex. I need help with code for scheduled Apex job for field update. The apex job should run every day during the last 5 days of each month. It should check if "Last Date" field (type: Date/time) has the current month. If the month of "Last Date" doesn't equal the current month then it should update "Status Indicator" field to "Red", otherwise the field should be "Green"

 

Object: Process

 

Field to be checked: Last Date__c

 

Condition: MONTH (DATEVALUE (Last Date__c)) !=  Month(Today())

 

Field to be updated: Status Indicator__c (Picklist values: Red, Green)

 

Running Time: Daily during Last 5 days of each month
1 réponse
0/9000