SAP Knowledge Base Article - Public

2526527 - "'assignmentType' can not be mapped as a property or an annotation.": Error while trying to call the Assigning or Unassigning SAP SuccessFactors Learning Programs to users

Symptom

We are not able to assign Programs to users using API in LMS

Environment

SuccessFactors Learning

Learning Management System

Reproducing the Issue

1.Generate user token

2.Use :

API URL : https://customer.plateau.com/learning/odatav4/public/user/userassignment-service/v1/UserPrograms

Method: POST

Payload :

{

"userProgram":[

  {

"programID": "ZT_L_CLASSROOM_ACE_001",

"programTypeID": "OPEN_ENDED",

"assignmentType": "OPT",

"assignmentDate": 1458248400000

  }

]

}

Response: 

{

    "error": {

        "code": null,

        "message": "'assignmentType' can not be mapped as a property or an annotation."

    }

}

Cause

The parameter assignmentType is incorrect in the Payload.

Resolution

The parameter 'assignmentType' in the payload should be replaced by 'assignmentTypeID'

The correct payload should look like :

{

"userProgram":[

  {

"programID": "ZT_L_CLASSROOM_ACE_001",

"programTypeID": "OPEN_ENDED",

"assignmentTypeID": "OPT",

"assignmentDate": 1458248400000

  }

]

}

See Also

https://launchpad.support.sap.com/#/notes/2318897

Keywords

'assignmentType' can not be mapped as a property or an annotation,assignmentType,program,assign,unassign,API,LMS,ODATA , KBA , LOD-SF-LMS-ODA , LMS Web Services OData , Problem

Product

SAP SuccessFactors HCM Core 1705 ; SAP SuccessFactors Learning 1602 ; SAP SuccessFactors Learning 1605 ; SAP SuccessFactors Learning 1608 ; SAP SuccessFactors Learning 1611 ; SAP SuccessFactors Learning 1702 ; SAP SuccessFactors Learning 1705 ; SAP SuccessFactors Learning 1708 ; SAP SuccessFactors Learning 1711