Symptom
The createdDateTime and lastModifiedDateTime are the same when using the API to view the workflow of custom MDF
Environment
SAP SuccessFactors HCM
Reproducing the Issue
1. Insert or Edit a record in a custom MDF block
2. A workflow is triggered
3.Use the following API call to retrieve the `lastModifiedDateTime` and `createdDateTime` of this workflow:
'https://apisalesdemo8.successfactors.com/odata/v2/cust_linkdisplay?$format=json&customPageSize=999&paging=cursor&fromDate=1900-01-01&toDate=9999-12-31&recordStatus=pending'
4. Approved this workflow
5. Use the following API call to retrieve the `lastModifiedDateTime` and `createdDateTime` after approval:
'https://apisalesdemo8.successfactors.com/odata/v2/cust_linkdisplay?$format=json&customPageSize=999&paging=cursor&fromDate=1900-01-01&toDate=9999-12-31&$filter=mdfSystemRecordStatus eq %27N%27 and externalCode eq %27sfadmin%27'
The `lastModifiedDateTime` and `createdDateTime` for this workflow are now both `1713239729` (timestamp corresponding to `2024-04-16 11:55:29 UTC+8`).
This is the same as the updated date in Manage Data.
Cause
Resolution
This is the expected behavior.
The first URL is used to retrieve the `createdDateTime` and `lastModifiedDateTime` of any pending workflows, which are expected to be identical.
The second URL is used to retrieve the `createdDateTime` and `lastModifiedDateTime` of the new data. These timestamps are also identical because this new data is formally written to the database only when the workflow is completed.
See Also
Keywords
createddate, lastmodifieddate, pending workflow, workflow, API, Custom MDF, OData API , KBA , LOD-SF-MDF-API , OData APIs & Integrations , Problem
Product
Attachments
Pasted image.png |
Pasted image.png |