SAP Knowledge Base Article - Public

2860563 - Retrieve MDF deleted records using API in SuccessFactors HXM Suite

Symptom

You are trying to get data from deleted records in an MDF object using the ODATA API in SuccessFactors.

Environment

  • SuccessFactors HXM Suite
    • OData API
    • SFAPI CompoundEmployee

Reproducing the Issue

[Enter your Reproducing the Issue here...]

Cause

[Enter your Cause here...]

Resolution

From the OData side, this feature (retrieve deleted records, example KBA 2628958 ) is not available. Past year my engineering colleagues started discussions about it, but everything is in early stages (no even planned for releases yet).

From the SFAPI CompoundEmployee side, if you can use SOAP, you can add MDF entities inside the payload using this KBA 2597777

This enhancement mechanism can be used for MDF objects that are related to the employee and not for MDF object that changes frequently.

Using SFAPI CE with enhanced MDF, you will see the deleted records in the payload like the example below:

 

Before the delete:

                            <cust_Test>
                                <action>INSERT</action>
                                <createdBy>666</createdBy>
                                <createdDate>2019-11-11T15:49:15.000Z</createdDate>
                                <cust_datesample>2019-11-11T05:00:00.000Z</cust_datesample>
                                <effectiveEndDate>9999-12-31</effectiveEndDate>
                                <effectiveStartDate>2019-11-11</effectiveStartDate>
                                <externalName>Test delete</externalName>
                                <lastModifiedBy>666</lastModifiedBy>
                                <lastModifiedDate>2019-11-11T15:49:15.000Z</lastModifiedDate>
                            </cust_Test>

After the delete:

                             <cust_Test>
                                <action>DELETE</action>
                                <createdBy>666</createdBy>
                                <createdDate>2019-11-11T15:49:15.000Z</createdDate>
                                <cust_datesample>2019-11-11T05:00:00.000Z</cust_datesample>
                                <effectiveEndDate>9999-12-31</effectiveEndDate>
                                <effectiveStartDate>2019-11-11</effectiveStartDate>
                                <externalName>Test delete</externalName>
                            </cust_Test>

 

FYI, the query used to retrieve these records above was:

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
    <Body>
        <query xmlns="urn:sfobject.sfapi.successfactors.com">
            <queryString>
               
               SELECT    employment_information,person,cust_Test
               FROM       CompoundEmployee 
               WHERE     last_modified_on > to_datetime('2019-10-01T00:00:00Z') AND
                                  person_id_external IN ('YOUR_EMPLOYEE_ID')         
           </queryString>   
           <param>
             <name>queryMode</name>
             <value>delta</value>
           </param>      
           <param>
              <name>resultOptions</name>
              <value>changedSegmentsOnly</value>
           </param>      
        </query>
    </Body>
</Envelope>

See Also

[Enter your See Also here...]

Keywords

Query on MDF deleted records in SuccessFactors HXM Suite, OData API, SFAPI CompoundEmployee, retrieve, get, download, query, fetch , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , LOD-SF-INT-CE , Compound Employee API , How To

Product

SAP SuccessFactors HXM Suite all versions