Showing results for 
Search instead for 
Did you mean: 

Compound Employee-How to retrieve records modified within a date range

0 Kudos

Hi All,

I have a scenario where i need to retrieve employee records from 2 months back. I tried passing the date in last modified on condition like last_modified_on > to_datetime('2023-03-01T00:29:53Z') but i am getting below error.

So i am trying to divide the payload by passing date ranges. I also tried passing fromDate and toDate like below but it was not working.

last_modified_on > to_datetime('2023-03-01T00:29:53Z') and fromDate = to_date('2023-03-01','yyyy-MM-dd') and toDate = to_date('2023-03-15','yyyy-MM-dd')

Please suggest how i can handle this scenario.


View Entire Topic

Hi there,

If you're using fromDate and toDate along with last_modified_on, you need to set queryMode=periodDelta for CompoundEmployee.

periodDelta will return:

· Changes on effective-dated entities with a validity in the past or with a validity overlapping with the given period and that have happened since the last export

· Changes on effective-dated entities done in the past and where the start date falls into the given period

· Changes on non-effective-dated entities that happened since the last export

So it excludes future-dated records that were input in the past until they become effective in the “current” period (i.e. between fromDate and toDate) – conveniently (and correctly) ignoring the last_modified_on for these records - because entries for the current period could have been input months ago, before the specified last_modified_on date.

Hope this helps.



0 Kudos
This is a fantastic description of the periodDelta query mode. Well done!