Symptom
How to retrieve all pending records from the MDF via SF OData API
"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
- MDF Odata API
Reproducing the Issue
Get: odata/v2/cust_ContractTest?$format=json&recordStatus=pending&$expand=wfRequestNav/wfRequestUINav
Results: We can retrieve only one record for each user.
Cause
The MDF Pending data query logic respects the asOfDate, fromDate, and toDate parameters.
If you don't specify any date or date period, the query uses today's date as the asOfDate value and fetch the current effective record.
Resolution
Please include the parameters 'fromDate' or 'toDate' in the query to retrieve records that are effective after or before a specific date.
e.g.
/odata/v2/cust_ContractTest?$format=json&recordStatus=pending&fromDate=2000-01-01&$expand=wfRequestNav/wfRequestUINav
/odata/v2/cust_ContractTest?$format=json&recordStatus=pending&toDate=2055-01-01&$expand=wfRequestNav/wfRequestUINav
See Also
Keywords
MDF history pending, MDF future pending, cannot get All MDF Pending, fromDate, toDate, Odata API, asOfDate , KBA , LOD-SF-INT-MDF , Metadata Framework API (MDF) , How To