...
Check if the primary employment of that Contact was created before or after the Employment_file data Date collection.
Download all the data from the Employment object in an Excel sheet (where
AQB__SetAsPrimary__c = TRUE
) with Contact ID, Start Date, and Created Date.Create a VLOOKUP column in Employment_file to retrieve the Created Date from Employment object sheet by running a VLOOKUP on Contact IDs.
Create an “Action” column with the following criteria:
If the Created Date is greater than or equal to the Employment_file collection dateDate: No Action (remove from your sheet as newer data is recorded).
If the Created Date is less than the Employment_file collection dateDate: Data Matching.
If the result is #N/A, it indicates no employment exists in the system for that Contact ID: Insert Data.
* Correct date format if needed (dd/mm/yyyy)
...