SAP Knowledge Base Article - Public

3442173 - Post Learning Events as Administrators with a Web Service

Symptom

LMS API call  learningEvent/v1/recordLearningEvents returns error message  "Missing replacement for place holder in message ''%1$s' can not be mapped as a property or an annotation.' for following arguments '[]'!"、

Posted BODY sample is shown as below:

{
    "@odata.type": "#recordLearningEvents",
    "recordLearningEvents": [
        {
            "componentTypeID": "COURSE",
            "componentID": "TEST ITEM",
            "revisionDate": 1701678840000,
            "studentID": "USER1",
            "completionStatusID": "COMPLETED",
            "completionDate": 1428506077000,
            "completionTimeZoneID": "UTC",
            "grade": "100",
            "revisionNumber": "1",
            "creditHours": null,
            "cpeHours": null,
            "contactHours": null,
            "totalHours": null,
            "instructorName": null,
            "scheduleID": null
        }
    ]
}

Environment

SAP SuccessFactors Learning

Cause

There is spacing between the Container and its value (e.g. "componentTypeID": "COURSE")

Resolution

Removing the spacing will solve the error.

The BODY sample is shown as below.

{
    "@odata.type":"#recordLearningEvents",
    "recordLearningEvents": [
        {
            "componentTypeID":"COURSE",
            "componentID":"TEST ITEM",
            "revisionDate":1701678840000,
            "studentID":"USER1",
            "completionStatusID":"COMPLETED",
            "completionDate":1428506077000,
            "completionTimeZoneID":"UTC",
            "grade":"100",
            "revisionNumber":"1",
            "creditHours":null,
            "cpeHours":null,
            "contactHours":null,
            "totalHours":null,
            "instructorName":null,
            "scheduleID":null
        }
    ]
}

See Also

2538937 - recordLearningEvents OData - "400 Error: 'componentTypeID' can not be mapped as a property or an annotation"

Keywords

API error, Learning, LMS, OData API, Call, Missing replacement for place holder, annotation, recordLearningEvents , KBA , LOD-SF-LMS-ODA , Web Services OData , Problem

Product

SAP SuccessFactors Learning all versions