Symptom
You have changed the data of a field and would like to retrieve the changed data as well as the previous data via Compound Employee API.
However, the API only returned the data and not the previous data even when the parameter value "renderPreviousTags" was passed.
Environment
Successfactors HCM
Reproducing the Issue
Below is the Compound Employee Query that is used:
<job_information>
....
....
<is_eligible_for_car>false</is_eligible_for_car>
<is_fulltime_employee>true</is_fulltime_employee>
<is_primary>false</is_primary>
<is_shift_employee>false</is_shift_employee>
<standard_hours>35.0</standard_hours>
<start_date>2016-02-18</start_date>
....
....
</job_information>
The older value (previous value) is not rendered along with the changed value. We can only see the curent value of standard_hours which is 35.0
....
....
<is_eligible_for_car>false</is_eligible_for_car>
<is_fulltime_employee>true</is_fulltime_employee>
<is_primary>false</is_primary>
<is_shift_employee>false</is_shift_employee>
<standard_hours>35.0</standard_hours>
<start_date>2016-02-18</start_date>
....
....
</job_information>
Cause
This is caused when the parameter "resultOptions" is not correctly passed when it is utilized more than once.
Resolution
Please use the parameter "resultOptions" as shown in the below example when it is utilized more than once.
<param> <name>resultOptions</name> <value>changedSegmentsonly, changedfieldsonly, renderPreviousTags</value> </param>
Complete example of this with the Query would look something like below -
<query xmlns="urn:sfobject.sfapi.successfactors.com">
<queryString>SELECT compensation_information,employment_information,job_information,paycompensation_non_recurring,paycompensation_recurring,person,
personal_information FROM CompoundEmployee WHERE last_modified_on > to_datetime('2016-02-18T09:36:33Z')AND person_id_external IN('TestUser')</queryString> <param> <name>maxRows</name> <value>200</value> </param> <param> <name>queryMode</name> <value>delta</value> </param> <param> <name>resultOptions</name> <value>changedSegmentsonly, changedfieldsonly, renderPreviousTags</value> </param> </query>
See Also
Please Note
Compound Employee API will not return previous tags for <action>INSERT</action>
Keywords
resultOptions parameter issue, KBA , LOD-SF-INT , Integrations , Problem