SAP Knowledge Base Article - Public

2868201 - Invalid reference '(effectiveStartDate=XXXX-XX-XX, externalCode=&&NO_OVERWRITE&&)' issue while doing UPSERT on Employee Central MDF entity, since Q4 2019 Preview Release

Symptom

  • You are doing UPSERT on an Employee Central MDF entity ( e.g. FOBusinessUnit).
  • You have defined an association with multiplicity 'One To One' and type 'Valid When' (e.g. the association is 'cust_Company').
  • In the above case, system will generate one more string property (e.g. 'cust_CompanyProp') along with the navigation property (e.g. 'cust_Company').
  • You are editing the association (e.g. 'cust_Company') through the string property (e.g. 'cust_CompanyProp') by providing a valid externalCode.
  • In some cases, you are putting "&&NO_OVERWRITE&&" value for the string property (e.g. "cust_CompanyProp": "&&NO_OVERWRITE&&" ).
  • It is giving you an error similar to the below mentioned error message regarding Invalid Reference:

Invalid reference '(effectiveStartDate=XXXX-XX-XX, externalCode=&&NO_OVERWRITE&&)' for valid when association 'cust_Company'. with the index 0

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

Reproducing the Issue

  1. Define an association with multiplicity 'One To One' and type 'Valid When' (e.g. the association is 'cust_Company').
  2. In the above case, system will generate one more string property (e.g. 'cust_CompanyProp') along with navigation property (e.g. 'cust_Company').
  3. Put "&&NO_OVERWRITE&&" value for the string property (e.g. "cust_CompanyProp": "&&NO_OVERWRITE&&" ).

Example Request Payload Format:

[
{
"entityName": "FOBusinessUnit",
"payload": [
{
"externalCode": "XXXXX",
"startDate": "/Date(XXXXXXXXXXXXX)/",
"cust_CompanyProp": "&&NO_OVERWRITE&&",
"description": "XXX",
"description_zh_CN": "",
"name": "XXXXXX",
"name_en_US": "XXXXX",
"name_ja_JP": "XXXXX",
"status": "ACTIVE",
"__metadata": {
"type": "SFOData.FOBusinessUnit",
"uri": "FOBusinessUnit(externalCode='XXXXX',startDate=datetime'XXXX-XX-XXT00:00:00')"
}
}
]
}
]

Error Received:

FOBusinessUnit: UPSERT failed for the row with key: FOBusinessUnit/externalCode=XXXXX,FOBusinessUnit/startDate=XXXX-XX-XXT00:00:00.000Z. Reason: Invalid reference '(effectiveStartDate=XXXX-XX-XX, externalCode=&&NO_OVERWRITE&&)' for valid when association 'cust_Company'..

Cause

Back-end program treats "&&NO_OVERWRITE&&" as externalCode and tries to load object from database with it. Due to this behavior, invalid reference occurs.

Resolution

  • For Preview Instances (which are already in version b1911), you can avoid this issue by enabling feature "Enable legacy OData edit for MDF Foundation Objects". The way to enable this feature is : Provisioning --> Company Settings --> "Enable legacy OData edit for MDF Foundation Objects".

Enable Legacy OData edit.PNG

  • For Productive Instances which are currently in version b1908, the issue would not be there. Once Productive instances go to b1911, if you get the above mentioned issue with the similar scenario, please edit the above check box in Provisioning.

(If you do not have an implementation partner, then you might not be having access to Provisioning. You can reach out to SAP SuccessFactors CPS by raising an incident under the component LOD-SF-INT)

  • We will be releasing a PATCH for this issue mostly after Production Release of b1911. Once the PATCH is released, you are good to un-check "Enable Legacy OData edit for MDF Foundation Objects" and execute the scenario normally. For tracking the PATCH status, you can raise an incident under LOD-SF-INT.

Keywords

Invalid reference, &&NO_OVERWRITE&&, EC2MDF, Employee Central MDF entity , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , Problem

Product

SAP SuccessFactors HXM Core all versions