Symptom
You are fetching data of employees whose records are modified later than a specific date. However, EC OData API returns user records older than the specified date.
NOTE: Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Environment
- SAP SuccessFactors HXM Suite
- OData API
Reproducing the Issue
OData Request
https://salesdemo4.successfactors.com/odata/v2/EmpJob?$select=lastModifiedDateTime&$filter=lastModifiedDateTime ge datetime'2015-07-01T17:19:28'&$top=1
OData Response
From the request, we expect that the lastModifiedDateTime is returned for datetime changes made after '2015-07-01T17:19:28'
However, from the response, we observe that API has fetched a record that dates to '2011-10-11T21:44:57Z'.
Resolution
If you use condition lastModifiedDateTime ge datetime'2015-07-01T17:19:28', any EC API will return not only the data which lastModifiedDateTime is greater than 2015-07-01T17:19:28, but also the record related to deleted records.
More explanation with respect to the above Odata response.
For the above userId "12345", there would be atleast one record which is deleted after the datetime 2015-07-01T17:19:28. Hence the API is returning this user's record for the above request xml.
Best Practice
Therefore, whenever you encounter such results, please check your data in SuccessFactors first.
See Also
If you are trying to delete a timeslice for an employee, make sure that the employee is left with at least one or more timeslices.
If all the records are deleted, the API would not pick their data in the response.
Keywords
lastModifiedDateTime, cannot, can't, not, working, able, successful, unsuccessful, unable, failed, failing, fails, error, issue, message, throws, throwing, returning, returns, rejecting, rejects, problem, wrong, SF, successfactor, request, integration, call, query, get, payload, response , KBA , old records returned , lastmodifieddatetime issue , LOD-SF-INT , Integrations , Problem