SAP Knowledge Base Article - Public

3387346 - Manage Templates - "Cannot read properties of undefined (reading 'count')" or Application Error when Editing Candidate Profile Template - Recruiting Management

Symptom

  • "Cannot read properties of undefined (reading 'count')" when trying to edit sm-mapping using Manage Templates tool.
  • An application error occurred when trying to Save As Draft or Publish a Candidate Profile Template.

Environment

SAP SuccessFactors Recruiting Management

Reproducing the Issue

Symptom 1

  1. Go to Manage Templates -> Recruiting Management -> Candidate Profile.
  2. Edit the candidate profile template.
  3. Click on General Settings -> Field Permission and Succession Mapping.
  4. Click on "xx Succession Mapping Elements defined. Click to modify."
  5. An error is displayed: "errorId=null, timestamp=null, errorMessage=Cannot read properties of undefined (reading 'count'), errorName=TypeError, server=xxx, versionInfo=xxx"

Symptom 2

  1. Go to Manage Templates -> Recruiting Management > Candidate Profile.
  2. Edit the candidate profile template.
  3. Click Save As Draft or Publish.
  4. An application error occurs.
  5. If closing the error pop-up, it displays "Changes failed. Publishing was not successful. Validation errors have been highlighted in red.", but no validation errors are highlighted.

Cause

The Employee Profile field(s) or background element(s) mapped in the sm-mapping section no longer exists.

Resolution

Troubleshooting Steps:

1. Review mapped data model fields and background elements in the Candidate Profile Template:

  1. Go to Manage Templates -> Recruiting Management -> Candidate Profile.
  2. Click on the Version number and download the latest version.
  3. Search for "sm-mapping" and review the data model fields at "map-to=". (For example: <sm-mapping field-id="CPT_fieldId" map-to="EP_fieldId" />)

For Partners only: Simply saving the candidate profile template at Provisioning and review the errors. The error related to the issue is "Error: The field-id xxx in sm-mapping does not exist in SM data model".

Note: The Check Tool cannot detect this error.

2. Review data model fields and background elements in the Employee Profile:

  1. Go to Manage Business Configuration.
  2. Expand Employee Profile.
  3. Expand "Background Elements" and "Standard".
  4. Check if the fields or background elements exist.

Solution:

Option 1: (Requiring Provisioning access) Remove the invalid sm-mapping from the Candidate Profile Template.

  1. Go to Provisioning -> Edit Candidate Profile Template.
  2. Remove the invalid sm-mapping.
  3. Save Form.

Option 2: (Not Requiring Provisioning access) Add the missing field or background element to the Employee Profile.

  1. Go to Manage Business Configuration.
  2. Expand Employee Profile.
  3. Add the field or background element.

This will ensure that there are no errors when editing the Candidate Profile Template using Manage Templates tool.

If you no longer need to use this Employee Profile field or background element: 1. Remove the sm-mapping from the Candidate Profile Template. 2. Then, remove the field or background element from the Employee Profile.

Keywords

RCM, CPT, candidate profile template, data model, employee profile, sm-mapping, succession, save, error, org.json.JSONObject$Null, fingerprint=41b2b78faa4e9eeb6ab8cfbb0244b4ac6bc92ace , KBA , LOD-SF-RCM-CAN , General Candidate Issues (not Offers, not Profiles) , LOD-SF-RCM , Recruiting Management , LOD-SF-RCM-ADM , Admin Center, RBP, Permissions and Settings , Problem

Product

SAP SuccessFactors Recruiting all versions